From b907f4559965bdfc7b38388671ab2cb32b48a35d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 9 Dec 2022 02:26:14 +0000 Subject: [PATCH] feat: add compact placement feature for node pools (#3636) - [ ] Regenerate this pull request now. chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: https://togithub.com/googleapis/googleapis/commit/758f0d1217d9c7fe398aa5efb1057ce4b6409e55 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 BEGIN_NESTED_COMMIT feat: add a FastSocket API PiperOrigin-RevId: 491381130 Source-Link: https://togithub.com/googleapis/googleapis/commit/6485d9c71aa756107393c3e03a30c344aabcc2c6 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/36f17cc94e07623aa384cbd40d694c111e97e41c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiMzZmMTdjYzk0ZTA3NjIzYWEzODRjYmQ0MGQ2OTRjMTExZTk3ZTQxYyJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: add a FastSocket API PiperOrigin-RevId: 491259489 Source-Link: https://togithub.com/googleapis/googleapis/commit/39bcdf411c9c099412ddf6b4247f50352d83e5ad Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/ee2470d9e7906d0764adb562f4d4cc41f0d6c96f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiZWUyNDcwZDllNzkwNmQwNzY0YWRiNTYyZjRkNGNjNDFmMGQ2Yzk2ZiJ9 END_NESTED_COMMITBEGIN_NESTED_COMMITfeat: add compact placement feature for node pools Use a compact placement policy to specify that nodes within the node pool should be placed in closer physical proximity to each other within a zone. Having nodes closer to each other can reduce network latency between nodes, which can be useful for tightly-coupled batch workloads. PiperOrigin-RevId: 488490422 Source-Link: https://togithub.com/googleapis/googleapis/commit/452324bf65d077decf455a1ef86eadf867962a66 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/008d00f619f8319eb584f26da56c1ca26e65bcd6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiMDA4ZDAwZjYxOWY4MzE5ZWI1ODRmMjZkYTU2YzFjYTI2ZTY1YmNkNiJ9 END_NESTED_COMMIT --- packages/google-container/README.md | 34 + .../google/container/v1/cluster_service.proto | 37 +- .../container/v1beta1/cluster_service.proto | 5215 ++ packages/google-container/protos/protos.d.ts | 20879 +++++- packages/google-container/protos/protos.js | 52515 ++++++++++++++++ packages/google-container/protos/protos.json | 5982 +- packages/google-container/samples/README.md | 612 + .../v1/cluster_manager.update_node_pool.js | 4 + .../snippet_metadata.google.container.v1.json | 6 +- .../cluster_manager.cancel_operation.js | 64 + .../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 | 156 + ...pet_metadata.google.container.v1beta1.json | 1907 + packages/google-container/src/index.ts | 5 +- .../src/v1/cluster_manager_client.ts | 5 + .../src/v1beta1/cluster_manager_client.ts | 4189 ++ .../cluster_manager_client_config.json | 194 + .../v1beta1/cluster_manager_proto_list.json | 3 + .../src/v1beta1/gapic_metadata.json | 367 + .../google-container/src/v1beta1/index.ts | 19 + .../test/gapic_cluster_manager_v1beta1.ts | 6767 ++ 52 files changed, 100894 insertions(+), 288 deletions(-) create mode 100644 packages/google-container/protos/google/container/v1beta1/cluster_service.proto create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js create mode 100644 packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js create mode 100644 packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json create mode 100644 packages/google-container/src/v1beta1/cluster_manager_client.ts create mode 100644 packages/google-container/src/v1beta1/cluster_manager_client_config.json create mode 100644 packages/google-container/src/v1beta1/cluster_manager_proto_list.json create mode 100644 packages/google-container/src/v1beta1/gapic_metadata.json create mode 100644 packages/google-container/src/v1beta1/index.ts create mode 100644 packages/google-container/test/gapic_cluster_manager_v1beta1.ts diff --git a/packages/google-container/README.md b/packages/google-container/README.md index 189d970d5e1..a8523b4e65d 100644 --- a/packages/google-container/README.md +++ b/packages/google-container/README.md @@ -122,6 +122,40 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Cluster_manager.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_cluster.js,samples/README.md) | | Cluster_manager.update_master | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_master.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_master.js,samples/README.md) | | Cluster_manager.update_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js,samples/README.md) | +| Cluster_manager.cancel_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js,samples/README.md) | +| Cluster_manager.complete_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js,samples/README.md) | +| Cluster_manager.complete_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js,samples/README.md) | +| Cluster_manager.create_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js,samples/README.md) | +| Cluster_manager.create_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js,samples/README.md) | +| Cluster_manager.delete_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js,samples/README.md) | +| Cluster_manager.delete_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js,samples/README.md) | +| Cluster_manager.get_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js,samples/README.md) | +| Cluster_manager.get_j_s_o_n_web_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js,samples/README.md) | +| Cluster_manager.get_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js,samples/README.md) | +| Cluster_manager.get_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js,samples/README.md) | +| Cluster_manager.get_server_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js,samples/README.md) | +| Cluster_manager.list_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js,samples/README.md) | +| Cluster_manager.list_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js,samples/README.md) | +| Cluster_manager.list_node_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js,samples/README.md) | +| Cluster_manager.list_operations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js,samples/README.md) | +| Cluster_manager.list_usable_subnetworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js,samples/README.md) | +| Cluster_manager.rollback_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js,samples/README.md) | +| Cluster_manager.set_addons_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js,samples/README.md) | +| Cluster_manager.set_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js,samples/README.md) | +| Cluster_manager.set_legacy_abac | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js,samples/README.md) | +| Cluster_manager.set_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js,samples/README.md) | +| Cluster_manager.set_logging_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js,samples/README.md) | +| Cluster_manager.set_maintenance_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js,samples/README.md) | +| Cluster_manager.set_master_auth | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js,samples/README.md) | +| Cluster_manager.set_monitoring_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js,samples/README.md) | +| Cluster_manager.set_network_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js,samples/README.md) | +| Cluster_manager.set_node_pool_autoscaling | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js,samples/README.md) | +| Cluster_manager.set_node_pool_management | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js,samples/README.md) | +| Cluster_manager.set_node_pool_size | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js,samples/README.md) | +| Cluster_manager.start_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js,samples/README.md) | +| Cluster_manager.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js,samples/README.md) | +| Cluster_manager.update_master | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js,samples/README.md) | +| Cluster_manager.update_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/quickstart.js,samples/README.md) | | Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/test/quickstart.test.js,samples/README.md) | 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 bcd0f13b48e..9fe74f68fbd 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -759,6 +759,9 @@ message NodeConfig { // 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; @@ -1278,9 +1281,8 @@ message BinaryAuthorization { // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. bool enabled = 1 [deprecated = true]; - // Mode of operation for binauthz policy evaluation. Currently the only - // options are equivalent to enable/disable. If unspecified, defaults to - // DISABLED. + // Mode of operation for binauthz policy evaluation. If unspecified, defaults + // to DISABLED. EvaluationMode evaluation_mode = 2; } @@ -2284,6 +2286,9 @@ message UpdateNodePoolRequest { // Enable or disable gvnic on the node pool. VirtualNIC gvnic = 29; + // Enable or disable NCCL fast socket for the node pool. + FastSocket fast_socket = 31; + // Logging configuration. NodePoolLoggingConfig logging_config = 32; @@ -2994,6 +2999,23 @@ message NodePool { 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; + } + // The name of the node pool. string name = 1; @@ -3063,6 +3085,9 @@ message NodePool { // Upgrade settings control disruption and speed of the upgrade. UpgradeSettings upgrade_settings = 107; + // Specifies the node placement policy. + PlacementPolicy placement_policy = 108; + // Output only. [Output only] Update info contains relevant information during a node // pool update. UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -4196,6 +4221,12 @@ message VirtualNIC { 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 { diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto new file mode 100644 index 00000000000..4b76a30eb25 --- /dev/null +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -0,0 +1,5215 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.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 = "google.golang.org/genproto/googleapis/container/v1beta1;container"; +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"; + } + + // 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"; + } + + // Gets the public component of the cluster signing keys in + // JSON Web Key format. + // This API is not yet intended for general use, and is not available for all + // clusters. + rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + }; + } + + // 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"; + } + + // 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; + } + + // 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; +} + +// 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; +} + +// 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. + 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 + // inforamtion 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; +} + +// 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; +} + +// 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; +} + +// 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. Each local SSD is 375 GB in size. + // If zero, it means to disable using local SSDs as ephemeral storage. + 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; +} + +// Kubernetes taint is comprised 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; + + string cluster_ca_certificate = 100; + + // [Output only] Base64-encoded public certificate used by clients to + // authenticate to the cluster endpoint. + string client_certificate = 101; + + // [Output only] Base64-encoded private key used by clients to authenticate + // to the cluster endpoint. + string client_key = 102; +} + +// 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 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 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 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; + + // Output only. The external IP address of this cluster's master endpoint. + string public_endpoint = 5; + + // Output only. The peering name in the customer VPC used by this cluster. + string peering_name = 7; + + // 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; +} + +// 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; + + // Output only. [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. [Output only] The services IPv6 CIDR block for the cluster. + string services_ipv6_cidr_block = 23 [(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; + } + + // 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; +} + +// 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; + + // 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. + 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; + + // [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]; + + // [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; + + // 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; + + // [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]; + + // [Output only] The time the cluster was created, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string create_time = 106; + + // [Output only] The current status of this cluster. + Status status = 107; + + // [Output only] Deprecated. Use conditions instead. + // Additional information about the current status of this + // cluster, if available. + string status_message = 108 [deprecated = true]; + + // [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; + + // [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; + + // Deprecated. Use node_pools.instance_group_urls. + repeated string instance_group_urls = 111 [deprecated = true]; + + // [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]; + + // [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; + + // [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; + + // 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; + + // 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; + + // Enable/Disable Protect API features for the cluster. + optional ProtectConfig protect_config = 137; +} + +// 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; +} + +// 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; +} + +// 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; +} + +// 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. + 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 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; + + // Enable/Disable Protect API features for the cluster. + optional ProtectConfig desired_protect_config = 112; + + // The desired config of Gateway API on this cluster. + GatewayAPIConfig desired_gateway_api_config = 114; + + // The desired node pool logging configuration defaults for the cluster. + NodePoolLoggingConfig desired_node_pool_logging_config = 116; +} + +// 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. + enum Type { + // Not set. + TYPE_UNSPECIFIED = 0; + + // Cluster create. + CREATE_CLUSTER = 1; + + // Cluster delete. + DELETE_CLUSTER = 2; + + // A master upgrade. + UPGRADE_MASTER = 3; + + // A node upgrade. + UPGRADE_NODES = 4; + + // Cluster repair. + REPAIR_CLUSTER = 5; + + // Cluster update. + UPDATE_CLUSTER = 6; + + // Node pool create. + CREATE_NODE_POOL = 7; + + // Node pool delete. + DELETE_NODE_POOL = 8; + + // Set node pool management. + SET_NODE_POOL_MANAGEMENT = 9; + + // Automatic node pool repair. + AUTO_REPAIR_NODES = 10; + + // Automatic node upgrade. + AUTO_UPGRADE_NODES = 11; + + // Set labels. + SET_LABELS = 12; + + // Set/generate master auth materials + SET_MASTER_AUTH = 13; + + // Set node pool size. + SET_NODE_POOL_SIZE = 14; + + // Updates network policy for a cluster. + SET_NETWORK_POLICY = 15; + + // Set the maintenance policy. + SET_MAINTENANCE_POLICY = 16; + } + + // The server-assigned ID for the operation. + string name = 1; + + // 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]; + + // The operation type. + Type operation_type = 3; + + // The current status of the operation. + Status status = 4; + + // Detailed operation progress, if available. + string detail = 8; + + // 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 + ]; + + // Server-defined URL for the resource. + string self_link = 6; + + // Server-defined URL for the target of the operation. + string target_link = 7; + + // [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; + + // [Output only] The time the operation started, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string start_time = 10; + + // [Output only] The time the operation completed, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string end_time = 11; + + // 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. + 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; + + // 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; +} + +// 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; +} + +// 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; + } + + // 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. +// 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. +message NodePool { + // 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 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; + } + + // 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; + + // The version of the Kubernetes of this node. + 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; + + // [Output only] The status of the nodes in this pool instance. + Status status = 103; + + // [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]; + + // 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; + + // Upgrade settings control disruption and speed of the upgrade. + UpgradeSettings upgrade_settings = 107; + + // Specifies the node placement policy. + PlacementPolicy placement_policy = 108; + + // Output only. [Output only] Update info contains relevant information during a node + // pool update. + UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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; + + // [Output only] This field is set when upgrades are about to commence + // with the description of the upgrade. + string description = 2; +} + +// 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; +} + +// 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 + // https://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. + string image_type = 10; +} + +// 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; +} + +// 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; + } + + // 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; +} + +// 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 { + // 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; + + // 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; + + // 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; +} + +// 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; + + // Gateway API support is enabled, experimental CRDs are installed + CHANNEL_EXPERIMENTAL = 3; + + // 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; + } + + // 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; +} + +// 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; + } + + // Denotes the state of etcd encryption. + State state = 2; + + // 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; +} + +// 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; +} + +// 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; + } + + // 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 priate IPv6 access to and from Google Services + PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; +} + +// Master is the configuration for components on master. +message Master { + +} + +// Autopilot is the configuration for Autopilot settings on the cluster. +message Autopilot { + // Enable Autopilot + bool enabled = 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. + 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; +} + +// 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; +} + +// 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; + } + + // 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; +} diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index f4da62cc9f7..9f0d2a3e481 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -1052,6 +1052,9 @@ export namespace google { /** NodeConfig confidentialNodes */ confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + /** NodeConfig fastSocket */ + fastSocket?: (google.container.v1.IFastSocket|null); + /** NodeConfig resourceLabels */ resourceLabels?: ({ [k: string]: string }|null); @@ -1149,12 +1152,18 @@ export namespace google { /** 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 _fastSocket. */ + public _fastSocket?: "fastSocket"; + /** * Creates a new NodeConfig instance using the specified properties. * @param [properties] Properties to set @@ -6887,6 +6896,9 @@ export namespace google { /** UpdateNodePoolRequest gvnic */ gvnic?: (google.container.v1.IVirtualNIC|null); + /** UpdateNodePoolRequest fastSocket */ + fastSocket?: (google.container.v1.IFastSocket|null); + /** UpdateNodePoolRequest loggingConfig */ loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); @@ -6960,6 +6972,9 @@ export namespace google { /** UpdateNodePoolRequest gvnic. */ public gvnic?: (google.container.v1.IVirtualNIC|null); + /** UpdateNodePoolRequest fastSocket. */ + public fastSocket?: (google.container.v1.IFastSocket|null); + /** UpdateNodePoolRequest loggingConfig. */ public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); @@ -9787,6 +9802,9 @@ export namespace google { /** 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); } @@ -9848,6 +9866,9 @@ export namespace google { /** 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); @@ -10298,6 +10319,112 @@ export namespace google { 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); + } + + /** 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); + + /** + * 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 NodeManagement. */ @@ -16554,6 +16681,103 @@ export namespace google { 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, @@ -18218,79 +18442,20501 @@ export namespace google { EXTERNAL = 2 } } - } - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { + /** Namespace v1beta1. */ + namespace v1beta1 { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** Represents a ClusterManager */ + class ClusterManager extends $protobuf.rpc.Service { - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** + * 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); - /** Represents a Http. */ - class Http implements IHttp { + /** + * 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; - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** + * 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; - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @returns Promise + */ + public listClusters(request: google.container.v1beta1.IListClustersRequest): Promise; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** + * 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; - /** - * 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; + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @returns Promise + */ + public getCluster(request: google.container.v1beta1.IGetClusterRequest): Promise; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @returns Promise + */ + public createCluster(request: google.container.v1beta1.ICreateClusterRequest): Promise; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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 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 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 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 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|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|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|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|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); + } + + /** 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); + + /** + * 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 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); + } + + /** 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); + + /** + * 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); + } + + /** 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 _fastSocket. */ + public _fastSocket?: "fastSocket"; + + /** + * 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); + } + + /** 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 _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** + * 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); + } + + /** 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 _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 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 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 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); + } + + /** 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); + + /** + * 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 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 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 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 subnetIpv6CidrBlock */ + subnetIpv6CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv6CidrBlock */ + servicesIpv6CidrBlock?: (string|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 subnetIpv6CidrBlock. */ + public subnetIpv6CidrBlock: string; + + /** IPAllocationPolicy servicesIpv6CidrBlock. */ + public servicesIpv6CidrBlock: string; + + /** + * 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); + } + + /** 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); + + /** + * 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 + } + } + + /** 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 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); + } + + /** 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 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 _nodePoolDefaults. */ + public _nodePoolDefaults?: "nodePoolDefaults"; + + /** Cluster _protectConfig. */ + public _protectConfig?: "protectConfig"; + + /** + * 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 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 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); + } + + /** 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); + + /** + * 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); + } + + /** 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); + + /** + * 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 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 desiredNodePoolLoggingConfig */ + desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|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 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 desiredNodePoolLoggingConfig. */ + public desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** ClusterUpdate _desiredEnablePrivateEndpoint. */ + public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; + + /** ClusterUpdate _desiredProtectConfig. */ + public _desiredProtectConfig?: "desiredProtectConfig"; + + /** + * 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 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 + } + } + + /** 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 fastSocket */ + fastSocket?: (google.container.v1beta1.IFastSocket|null); + + /** UpdateNodePoolRequest loggingConfig */ + loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** UpdateNodePoolRequest resourceLabels */ + resourceLabels?: (google.container.v1beta1.IResourceLabels|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 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); + + /** + * 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 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 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 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.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 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); + } + + /** 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); + + /** + * 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, + 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); + } + + /** 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); + + /** + * 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 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); + } + + /** 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; + + /** + * 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); + } + + /** 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 _gpuSharingConfig. */ + public _gpuSharingConfig?: "gpuSharingConfig"; + + /** + * 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 + } + } + + /** 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); + } + + /** 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); + + /** + * 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; + } + + /** 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); + } + + /** 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; + + /** + * 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 + } + + /** 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 state */ + state?: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State|null); + + /** DatabaseEncryption keyName */ + keyName?: (string|null); + } + + /** Represents a DatabaseEncryption. */ + class DatabaseEncryption implements IDatabaseEncryption { + + /** + * Constructs a new DatabaseEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDatabaseEncryption); + + /** DatabaseEncryption state. */ + public state: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State); + + /** DatabaseEncryption keyName. */ + public keyName: string; + + /** + * 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 + } + } + + /** 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 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 + } + } + + /** 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 Autopilot. */ + interface IAutopilot { + + /** Autopilot enabled */ + enabled?: (boolean|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; + + /** + * 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 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 MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig componentConfig */ + componentConfig?: (google.container.v1beta1.IMonitoringComponentConfig|null); + + /** MonitoringConfig managedPrometheusConfig */ + managedPrometheusConfig?: (google.container.v1beta1.IManagedPrometheusConfig|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); + + /** + * 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 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 + } + } + + /** DatapathProvider enum. */ + enum DatapathProvider { + DATAPATH_PROVIDER_UNSPECIFIED = 0, + LEGACY_DATAPATH = 1, + ADVANCED_DATAPATH = 2 + } + } + } + + /** 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 @@ -23601,4 +44247,117 @@ export namespace google { 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/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index 02fcf740dbe..e2b9a0687ab 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -1808,6 +1808,7 @@ * @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 */ @@ -2050,6 +2051,14 @@ */ 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 @@ -2066,6 +2075,20 @@ */ NodeConfig.prototype.loggingConfig = null; + // 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) + }); + /** * Creates a new NodeConfig instance using the specified properties. * @function create @@ -2150,6 +2173,8 @@ 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(); @@ -2343,6 +2368,10 @@ 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 = {}; @@ -2405,6 +2434,7 @@ 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"; @@ -2536,6 +2566,14 @@ 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"; @@ -2684,6 +2722,11 @@ 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"); @@ -2820,6 +2863,11 @@ 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) @@ -17786,6 +17834,7 @@ * @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 {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 */ @@ -17958,6 +18007,14 @@ */ UpdateNodePoolRequest.prototype.gvnic = null; + /** + * 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 @@ -18037,6 +18094,8 @@ $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.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")) @@ -18153,6 +18212,10 @@ message.gvnic = $root.google.container.v1.VirtualNIC.decode(reader, reader.uint32()); 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; @@ -18279,6 +18342,11 @@ if (error) return "gvnic." + error; } + 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) @@ -18380,6 +18448,11 @@ throw TypeError(".google.container.v1.UpdateNodePoolRequest.gvnic: object expected"); message.gvnic = $root.google.container.v1.VirtualNIC.fromObject(object.gvnic); } + 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"); @@ -18427,6 +18500,7 @@ object.gcfsConfig = null; object.confidentialNodes = null; object.gvnic = null; + object.fastSocket = null; object.loggingConfig = null; object.resourceLabels = null; } @@ -18471,6 +18545,8 @@ 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.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")) @@ -25240,6 +25316,7 @@ * @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 */ @@ -25389,6 +25466,14 @@ */ 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 @@ -25456,6 +25541,8 @@ $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(); return writer; @@ -25562,6 +25649,10 @@ 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; @@ -25685,6 +25776,11 @@ 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) @@ -25807,6 +25903,11 @@ 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"); @@ -25847,6 +25948,7 @@ object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; object.statusMessage = ""; object.upgradeSettings = null; + object.placementPolicy = null; object.updateInfo = null; } if (message.name != null && message.hasOwnProperty("name")) @@ -25890,6 +25992,8 @@ } 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); return object; @@ -26895,6 +26999,242 @@ 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 + */ + + /** + * 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; + + /** + * 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); + 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; + } + 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; + } + 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; + } + 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; + 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; + 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; + })(); + return NodePool; })(); @@ -42160,6 +42500,209 @@ 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 @@ -46183,6 +46726,51716 @@ return v1; })(); + 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|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|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|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|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 + */ + + /** + * 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; + + /** + * 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); + 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; + } + 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"; + 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; + } + 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; + } + 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; + 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; + })(); + + return LinuxNodeConfig; + })(); + + 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 + */ + + /** + * 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; + + /** + * 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); + 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; + } + 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"; + 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"; + 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(); + 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; + 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 + */ + + /** + * 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 = {}; + if (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; + + // 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) + }); + + /** + * 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(); + 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; + } + 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; + } + 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); + } + 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 = []; + } + 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; + } + 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); + 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 + */ + + /** + * 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; + + // 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) + }); + + /** + * 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); + 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; + } + 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"; + } + 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(); + 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"; + } + 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 + */ + + /** + * 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) { + if (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; + + // 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(); + 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; + } + 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; + } + } + 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); + } + 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.defaults) { + object.createPodRange = false; + object.podRange = ""; + object.podIpv4CidrBlock = ""; + } + 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"; + } + 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.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.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.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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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; + } + 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); + } + 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; + } + 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); + 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.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.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.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 {string|null} [subnetIpv6CidrBlock] IPAllocationPolicy subnetIpv6CidrBlock + * @property {string|null} [servicesIpv6CidrBlock] IPAllocationPolicy servicesIpv6CidrBlock + */ + + /** + * 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 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 = ""; + + /** + * 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.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); + 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 22: { + message.subnetIpv6CidrBlock = reader.string(); + break; + } + case 23: { + message.servicesIpv6CidrBlock = reader.string(); + 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.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"; + 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.subnetIpv6CidrBlock != null) + message.subnetIpv6CidrBlock = String(object.subnetIpv6CidrBlock); + if (object.servicesIpv6CidrBlock != null) + message.servicesIpv6CidrBlock = String(object.servicesIpv6CidrBlock); + 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.subnetIpv6CidrBlock = ""; + object.servicesIpv6CidrBlock = ""; + } + 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.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) + object.subnetIpv6CidrBlock = message.subnetIpv6CidrBlock; + if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) + object.servicesIpv6CidrBlock = message.servicesIpv6CidrBlock; + 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 + */ + + /** + * 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) { + if (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; + + /** + * 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); + 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; + } + 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: + break; + } + 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; + } + 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.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; + 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 + */ + 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; + })(); + + 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 {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 + */ + + /** + * 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 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; + + // 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) + }); + + /** + * 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(); + 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 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; + } + 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.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; + } + } + 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.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); + } + 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; + } + 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"; + } + 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.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.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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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; + } + 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); + } + 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; + } + 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); + 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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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; + } + 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); + } + 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; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) + object.networkTags = $root.google.container.v1beta1.NetworkTags.toObject(message.networkTags, 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.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 {google.container.v1beta1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig + */ + + /** + * 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 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 desiredNodePoolLoggingConfig. + * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} desiredNodePoolLoggingConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolLoggingConfig = 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) + }); + + /** + * 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.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.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) + $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).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 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 116: { + message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.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.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.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) { + var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.desiredNodePoolLoggingConfig); + if (error) + return "desiredNodePoolLoggingConfig." + 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.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.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); + } + 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.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.desiredNodePoolLoggingConfig = 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.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.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) + object.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, 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.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: + 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; + } + 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 + */ + 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; + 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 {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 + */ + + /** + * 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 = []; + if (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 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; + + /** + * 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.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(); + 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 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; + } + 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.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; + } + 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.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); + } + 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 = []; + 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.fastSocket = null; + object.loggingConfig = null; + object.resourceLabels = 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.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); + 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: + 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; + } + 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.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.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 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"|undefined} rolloutPolicy + * @memberof google.container.v1beta1.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.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(); + 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 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.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.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"; + } + 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; + })(); + + 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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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; + } + 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); + } + 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; + } + 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); + 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 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 "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} 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.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 + */ + + /** + * 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; + + /** + * 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); + 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; + } + 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; + } + 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; + } + 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; + 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; + 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; + })(); + + 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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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; + } + 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"; + 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"; + 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); + 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; + 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 + */ + + /** + * 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; + + // 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) + }); + + /** + * 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(); + 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; + } + 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; + } + } + 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); + } + 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"; + } + 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: + 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; + } + 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 + */ + GPUSharingConfig.GPUSharingStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GPU_SHARING_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIME_SHARING"] = 1; + return values; + })(); + + return GPUSharingConfig; + })(); + + 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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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"; + 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; + } + 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); + } + 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; + } + 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); + 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"; + }; + + 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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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; + } + 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: + 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"; + 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; + } + 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); + 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 = ""; + } + 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; + 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 + */ + 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; + 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 {google.container.v1beta1.DatabaseEncryption.State|null} [state] DatabaseEncryption state + * @property {string|null} [keyName] DatabaseEncryption keyName + */ + + /** + * 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) { + if (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 state. + * @member {google.container.v1beta1.DatabaseEncryption.State} state + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.state = 0; + + /** + * DatabaseEncryption keyName. + * @member {string} keyName + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.keyName = ""; + + /** + * 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); + 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 2: { + message.state = reader.int32(); + break; + } + case 1: { + message.keyName = reader.string(); + 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"; + 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.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + 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(); + 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; + } + if (object.keyName != null) + message.keyName = String(object.keyName); + 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.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; + 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; + })(); + + 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.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: + 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; + } + 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 + */ + 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; + 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.Autopilot = (function() { + + /** + * Properties of an Autopilot. + * @memberof google.container.v1beta1 + * @interface IAutopilot + * @property {boolean|null} [enabled] Autopilot enabled + */ + + /** + * 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; + + /** + * 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); + 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; + } + 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"; + 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); + 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; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + 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.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.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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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; + } + 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); + } + 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; + } + 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); + 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.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: + 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; + } + } + 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 + */ + 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; + 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; + })(); + + return v1beta1; + })(); + return container; })(); @@ -60340,6 +112593,268 @@ 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; })(); diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index bda86bdfe12..c73de796a86 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -905,6 +905,13 @@ } }, "NodeConfig": { + "oneofs": { + "_fastSocket": { + "oneof": [ + "fastSocket" + ] + } + }, "fields": { "machineType": { "type": "string", @@ -1020,6 +1027,13 @@ "type": "ConfidentialNodes", "id": 35 }, + "fastSocket": { + "type": "FastSocket", + "id": 36, + "options": { + "proto3_optional": true + } + }, "resourceLabels": { "keyType": "string", "type": "string", @@ -2511,6 +2525,10 @@ "type": "VirtualNIC", "id": 29 }, + "fastSocket": { + "type": "FastSocket", + "id": 31 + }, "loggingConfig": { "type": "NodePoolLoggingConfig", "id": 32 @@ -3300,6 +3318,10 @@ "type": "UpgradeSettings", "id": 107 }, + "placementPolicy": { + "type": "PlacementPolicy", + "id": 108 + }, "updateInfo": { "type": "UpdateInfo", "id": 109, @@ -3407,6 +3429,22 @@ "STOPPING": 5, "ERROR": 6 } + }, + "PlacementPolicy": { + "fields": { + "type": { + "type": "Type", + "id": 1 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "COMPACT": 1 + } + } + } } } }, @@ -4594,6 +4632,14 @@ } } }, + "FastSocket": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, "PrivateIPv6GoogleAccess": { "values": { "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, @@ -4889,231 +4935,5695 @@ } } } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Container.V1Beta1", + "go_package": "google.golang.org/genproto/googleapis/container/v1beta1;container", + "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": { - "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": { + "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" + } + ] + }, + "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" + } + ] + }, + "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" + } + } + ] + }, + "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" + } + ] + }, + "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": { + "fields": { + "sysctls": { + "keyType": "string", + "type": "string", + "id": 1 + }, + "cgroupMode": { + "type": "CgroupMode", + "id": 2 + } + }, + "nested": { + "CgroupMode": { + "values": { + "CGROUP_MODE_UNSPECIFIED": 0, + "CGROUP_MODE_V1": 1, + "CGROUP_MODE_V2": 2 + } + } + } + }, + "NodeKubeletConfig": { + "fields": { + "cpuManagerPolicy": { + "type": "string", + "id": 1 + }, + "cpuCfsQuota": { + "type": "google.protobuf.BoolValue", + "id": 2 + }, + "cpuCfsQuotaPeriod": { + "type": "string", + "id": 3 + }, + "podPidsLimit": { + "type": "int64", + "id": 4 + } + } + }, + "NodeConfig": { + "oneofs": { + "_fastSocket": { + "oneof": [ + "fastSocket" + ] + } + }, + "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 + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + } + }, + "fields": { + "threadsPerCore": { + "type": "int64", + "id": 1, + "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 + } + } + }, + "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 + } + } + } + } + } + }, + "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 + } + } + }, + "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 + } + } + } + }, + "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 + }, + "clientCertificate": { + "type": "string", + "id": 101 + }, + "clientKey": { + "type": "string", + "id": 102 + } + } + }, + "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 + } + } + }, + "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 + } + } + }, + "ConfigConnectorConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcePersistentDiskCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcpFilestoreCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "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 + }, + "publicEndpoint": { + "type": "string", + "id": 5 + }, + "peeringName": { + "type": "string", + "id": 7 + }, + "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 + } + } + } + }, + "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 + }, + "subnetIpv6CidrBlock": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "servicesIpv6CidrBlock": { + "type": "string", + "id": 23, + "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 + } + }, + "nested": { + "EvaluationMode": { + "values": { + "EVALUATION_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "PROJECT_SINGLETON_POLICY_ENFORCE": 2 + } + } + } + }, + "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" + ] + } + }, + "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 + }, + "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 + }, + "zone": { + "type": "string", + "id": 101, + "options": { + "deprecated": true + } + }, + "endpoint": { + "type": "string", + "id": 102 + }, + "initialClusterVersion": { + "type": "string", + "id": 103 + }, + "currentMasterVersion": { + "type": "string", + "id": 104 + }, + "currentNodeVersion": { + "type": "string", + "id": 105, + "options": { + "deprecated": true + } + }, + "createTime": { + "type": "string", + "id": 106 + }, + "status": { + "type": "Status", + "id": 107 + }, + "statusMessage": { + "type": "string", + "id": 108, + "options": { + "deprecated": true + } + }, + "nodeIpv4CidrSize": { + "type": "int32", + "id": 109 + }, + "servicesIpv4Cidr": { + "type": "string", + "id": 110 + }, + "instanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 111, + "options": { + "deprecated": true + } + }, + "currentNodeCount": { + "type": "int32", + "id": 112, + "options": { + "deprecated": true + } + }, + "expireTime": { + "type": "string", + "id": 113 + }, + "location": { + "type": "string", + "id": 114 + }, + "enableTpu": { + "type": "bool", + "id": 115 + }, + "tpuIpv4CidrBlock": { + "type": "string", + "id": 116 + }, + "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": { + "proto3_optional": true + } + } + }, + "nested": { + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "RECONCILING": 3, + "STOPPING": 4, + "ERROR": 5, + "DEGRADED": 6 + } + } + } + }, + "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 + } + } + } + }, + "NodePoolDefaults": { + "fields": { + "nodeConfigDefaults": { + "type": "NodeConfigDefaults", + "id": 1 + } + } + }, + "NodeConfigDefaults": { + "fields": { + "gcfsConfig": { + "type": "GcfsConfig", + "id": 1 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 3 + } + } + }, + "NodePoolAutoConfig": { + "fields": { + "networkTags": { + "type": "NetworkTags", + "id": 1 + } + } + }, + "ClusterUpdate": { + "oneofs": { + "_desiredEnablePrivateEndpoint": { + "oneof": [ + "desiredEnablePrivateEndpoint" + ] + }, + "_desiredProtectConfig": { + "oneof": [ + "desiredProtectConfig" + ] + } + }, + "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 + }, + "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": { + "proto3_optional": true + } + }, + "desiredGatewayApiConfig": { + "type": "GatewayAPIConfig", + "id": 114 + }, + "desiredNodePoolLoggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 116 + } + } + }, + "Operation": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "operationType": { + "type": "Type", + "id": 3 + }, + "status": { + "type": "Status", + "id": 4 + }, + "detail": { + "type": "string", + "id": 8 + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "selfLink": { + "type": "string", + "id": 6 + }, + "targetLink": { + "type": "string", + "id": 7 + }, + "location": { + "type": "string", + "id": 9 + }, + "startTime": { + "type": "string", + "id": 10 + }, + "endTime": { + "type": "string", + "id": 11 + }, + "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": { + "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 + } + } + } + }, + "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 + }, + "fastSocket": { + "type": "FastSocket", + "id": 31 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 32 + }, + "resourceLabels": { + "type": "ResourceLabels", + "id": 33 + } + } + }, + "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 + } + } + } + } + } + } + }, + "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" + ] + }, + "_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 + }, + "version": { + "type": "string", + "id": 101 + }, + "instanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 102 + }, + "status": { + "type": "Status", + "id": 103 + }, + "statusMessage": { + "type": "string", + "id": 104, + "options": { + "deprecated": true + } + }, + "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 + }, + "upgradeSettings": { + "type": "UpgradeSettings", + "id": 107 + }, + "placementPolicy": { + "type": "PlacementPolicy", + "id": 108 + }, + "updateInfo": { + "type": "UpdateInfo", + "id": 109, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "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 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "COMPACT": 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 + }, + "description": { + "type": "string", + "id": 2 + } + } + }, + "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 + } + } + }, + "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": { + "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 + } + } + }, + "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" + ] + } + }, + "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 + } + } + } + }, + "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 + } + } + } + }, + "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": { + "fields": { + "network": { + "type": "string", + "id": 1 + }, + "subnetwork": { + "type": "string", + "id": 2 + }, + "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 + } + } + }, + "GatewayAPIConfig": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + } + }, + "nested": { + "Channel": { + "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 + } + }, + "nested": { + "Provider": { + "values": { + "PROVIDER_UNSPECIFIED": 0, + "PLATFORM_DEFAULT": 1, + "CLOUD_DNS": 2 + } + }, + "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": { + "fields": { + "state": { + "type": "State", + "id": 2 + }, + "keyName": { + "type": "string", + "id": 1 + } + }, + "nested": { + "State": { + "values": { + "UNKNOWN": 0, + "ENCRYPTED": 1, + "DECRYPTED": 2 + } + } + } + }, + "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 + } + } + }, + "ReleaseChannel": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + } + }, + "nested": { + "Channel": { + "values": { + "UNSPECIFIED": 0, + "RAPID": 1, + "REGULAR": 2, + "STABLE": 3 + } + } + } + }, + "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": {} + }, + "Autopilot": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "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 + } + } + } + }, + "MonitoringConfig": { + "fields": { + "componentConfig": { + "type": "MonitoringComponentConfig", + "id": 1 + }, + "managedPrometheusConfig": { + "type": "ManagedPrometheusConfig", + "id": 2 + } + } + }, + "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 + } + } + } + }, + "DatapathProvider": { + "values": { + "DATAPATH_PROVIDER_UNSPECIFIED": 0, + "LEGACY_DATAPATH": 1, + "ADVANCED_DATAPATH": 2 + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { "fields": { "file": { "rule": "repeated", @@ -6195,6 +11705,34 @@ } } } + }, + "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 + } + } + } + } } } } diff --git a/packages/google-container/samples/README.md b/packages/google-container/samples/README.md index 57c39746882..209c83c5dd8 100644 --- a/packages/google-container/samples/README.md +++ b/packages/google-container/samples/README.md @@ -45,6 +45,40 @@ * [Cluster_manager.update_cluster](#cluster_manager.update_cluster) * [Cluster_manager.update_master](#cluster_manager.update_master) * [Cluster_manager.update_node_pool](#cluster_manager.update_node_pool) + * [Cluster_manager.cancel_operation](#cluster_manager.cancel_operation) + * [Cluster_manager.complete_i_p_rotation](#cluster_manager.complete_i_p_rotation) + * [Cluster_manager.complete_node_pool_upgrade](#cluster_manager.complete_node_pool_upgrade) + * [Cluster_manager.create_cluster](#cluster_manager.create_cluster) + * [Cluster_manager.create_node_pool](#cluster_manager.create_node_pool) + * [Cluster_manager.delete_cluster](#cluster_manager.delete_cluster) + * [Cluster_manager.delete_node_pool](#cluster_manager.delete_node_pool) + * [Cluster_manager.get_cluster](#cluster_manager.get_cluster) + * [Cluster_manager.get_j_s_o_n_web_keys](#cluster_manager.get_j_s_o_n_web_keys) + * [Cluster_manager.get_node_pool](#cluster_manager.get_node_pool) + * [Cluster_manager.get_operation](#cluster_manager.get_operation) + * [Cluster_manager.get_server_config](#cluster_manager.get_server_config) + * [Cluster_manager.list_clusters](#cluster_manager.list_clusters) + * [Cluster_manager.list_locations](#cluster_manager.list_locations) + * [Cluster_manager.list_node_pools](#cluster_manager.list_node_pools) + * [Cluster_manager.list_operations](#cluster_manager.list_operations) + * [Cluster_manager.list_usable_subnetworks](#cluster_manager.list_usable_subnetworks) + * [Cluster_manager.rollback_node_pool_upgrade](#cluster_manager.rollback_node_pool_upgrade) + * [Cluster_manager.set_addons_config](#cluster_manager.set_addons_config) + * [Cluster_manager.set_labels](#cluster_manager.set_labels) + * [Cluster_manager.set_legacy_abac](#cluster_manager.set_legacy_abac) + * [Cluster_manager.set_locations](#cluster_manager.set_locations) + * [Cluster_manager.set_logging_service](#cluster_manager.set_logging_service) + * [Cluster_manager.set_maintenance_policy](#cluster_manager.set_maintenance_policy) + * [Cluster_manager.set_master_auth](#cluster_manager.set_master_auth) + * [Cluster_manager.set_monitoring_service](#cluster_manager.set_monitoring_service) + * [Cluster_manager.set_network_policy](#cluster_manager.set_network_policy) + * [Cluster_manager.set_node_pool_autoscaling](#cluster_manager.set_node_pool_autoscaling) + * [Cluster_manager.set_node_pool_management](#cluster_manager.set_node_pool_management) + * [Cluster_manager.set_node_pool_size](#cluster_manager.set_node_pool_size) + * [Cluster_manager.start_i_p_rotation](#cluster_manager.start_i_p_rotation) + * [Cluster_manager.update_cluster](#cluster_manager.update_cluster) + * [Cluster_manager.update_master](#cluster_manager.update_master) + * [Cluster_manager.update_node_pool](#cluster_manager.update_node_pool) * [Quickstart](#quickstart) * [Quickstart.test](#quickstart.test) @@ -624,6 +658,584 @@ __Usage:__ +### Cluster_manager.cancel_operation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js` + + +----- + + + + +### Cluster_manager.complete_i_p_rotation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js` + + +----- + + + + +### Cluster_manager.complete_node_pool_upgrade + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js` + + +----- + + + + +### Cluster_manager.create_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js` + + +----- + + + + +### Cluster_manager.create_node_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js` + + +----- + + + + +### Cluster_manager.delete_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js` + + +----- + + + + +### Cluster_manager.delete_node_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js` + + +----- + + + + +### Cluster_manager.get_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js` + + +----- + + + + +### Cluster_manager.get_j_s_o_n_web_keys + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js` + + +----- + + + + +### Cluster_manager.get_node_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js` + + +----- + + + + +### Cluster_manager.get_operation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js` + + +----- + + + + +### Cluster_manager.get_server_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js` + + +----- + + + + +### Cluster_manager.list_clusters + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js` + + +----- + + + + +### Cluster_manager.list_locations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js` + + +----- + + + + +### Cluster_manager.list_node_pools + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js` + + +----- + + + + +### Cluster_manager.list_operations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js` + + +----- + + + + +### Cluster_manager.list_usable_subnetworks + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js` + + +----- + + + + +### Cluster_manager.rollback_node_pool_upgrade + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js` + + +----- + + + + +### Cluster_manager.set_addons_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js` + + +----- + + + + +### Cluster_manager.set_labels + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js` + + +----- + + + + +### Cluster_manager.set_legacy_abac + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js` + + +----- + + + + +### Cluster_manager.set_locations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js` + + +----- + + + + +### Cluster_manager.set_logging_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js` + + +----- + + + + +### Cluster_manager.set_maintenance_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js` + + +----- + + + + +### Cluster_manager.set_master_auth + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js` + + +----- + + + + +### Cluster_manager.set_monitoring_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js` + + +----- + + + + +### Cluster_manager.set_network_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js` + + +----- + + + + +### Cluster_manager.set_node_pool_autoscaling + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js` + + +----- + + + + +### Cluster_manager.set_node_pool_management + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js` + + +----- + + + + +### Cluster_manager.set_node_pool_size + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js` + + +----- + + + + +### Cluster_manager.start_i_p_rotation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js` + + +----- + + + + +### Cluster_manager.update_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js` + + +----- + + + + +### Cluster_manager.update_master + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js` + + +----- + + + + +### Cluster_manager.update_node_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/quickstart.js). diff --git a/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js b/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js index ef5b9e8dfff..39c83585e9c 100644 --- a/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js +++ b/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js @@ -109,6 +109,10 @@ function main(nodeVersion, imageType) { * Enable or disable gvnic on the node pool. */ // const gvnic = {} + /** + * Enable or disable NCCL fast socket for the node pool. + */ + // const fastSocket = {} /** * Logging configuration. */ diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index 9d2b6ffce5e..b44e088cb49 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -230,7 +230,7 @@ "segments": [ { "start": 25, - "end": 140, + "end": 144, "type": "FULL" } ], @@ -315,6 +315,10 @@ "name": "gvnic", "type": ".google.container.v1.VirtualNIC" }, + { + "name": "fast_socket", + "type": ".google.container.v1.FastSocket" + }, { "name": "logging_config", "type": ".google.container.v1.NodePoolLoggingConfig" diff --git a/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js new file mode 100644 index 00000000000..471df34c2a7 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js new file mode 100644 index 00000000000..31d6b4c7eaa --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js new file mode 100644 index 00000000000..cd725daf445 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [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/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js new file mode 100644 index 00000000000..a4afd046560 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js new file mode 100644 index 00000000000..8e15c03c402 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js new file mode 100644 index 00000000000..f6a8e762337 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js new file mode 100644 index 00000000000..70e9fde5f41 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js new file mode 100644 index 00000000000..cd640bfaac3 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js new file mode 100644 index 00000000000..7fd35bfc50f --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [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/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js new file mode 100644 index 00000000000..f7b2a5c6b1c --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js new file mode 100644 index 00000000000..135622a1a0d --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js new file mode 100644 index 00000000000..257aea3674c --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js new file mode 100644 index 00000000000..0bfafb06810 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js new file mode 100644 index 00000000000..331f153b00c --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START 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/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js new file mode 100644 index 00000000000..fead114758f --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js new file mode 100644 index 00000000000..19ed1a9a89b --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js new file mode 100644 index 00000000000..ce8de43edc3 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js @@ -0,0 +1,83 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START 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 = await 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/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js new file mode 100644 index 00000000000..8972727ab17 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js @@ -0,0 +1,71 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js new file mode 100644 index 00000000000..52c9bf19864 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js new file mode 100644 index 00000000000..b7c931aaa1e --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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 = 1234 + /** + * 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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js new file mode 100644 index 00000000000..42953c0f2da --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js new file mode 100644 index 00000000000..f0e76b69780 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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 = 'abc123' + /** + * 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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js new file mode 100644 index 00000000000..9b10e0c5f03 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js new file mode 100644 index 00000000000..7757a7d4d89 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js @@ -0,0 +1,86 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js new file mode 100644 index 00000000000..e5c55004399 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js new file mode 100644 index 00000000000..f7470b273e5 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js new file mode 100644 index 00000000000..efc2193bcb0 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js new file mode 100644 index 00000000000..e9e7021228f --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js @@ -0,0 +1,71 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js new file mode 100644 index 00000000000..cd629b6f9dc --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js @@ -0,0 +1,71 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js new file mode 100644 index 00000000000..a2e226e2251 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js @@ -0,0 +1,71 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js new file mode 100644 index 00000000000..58425e8b3c9 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js new file mode 100644 index 00000000000..dc627e86cb8 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js new file mode 100644 index 00000000000..11826d969f4 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js b/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js new file mode 100644 index 00000000000..c44e0ead77d --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js @@ -0,0 +1,156 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(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. + */ + // 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 = 'abc123' + /** + * 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 = {} + /** + * 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 = {} + + // 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/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json new file mode 100644 index 00000000000..9bbea0e7e24 --- /dev/null +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -0,0 +1,1907 @@ +{ + "clientLibrary": { + "name": "nodejs-container", + "version": "4.4.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": 148, + "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": "fast_socket", + "type": ".google.container.v1beta1.FastSocket" + }, + { + "name": "logging_config", + "type": ".google.container.v1beta1.NodePoolLoggingConfig" + }, + { + "name": "resource_labels", + "type": ".google.container.v1beta1.ResourceLabels" + } + ], + "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_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_GetJSONWebKeys_async", + "title": "ClusterManager getJSONWebKeys Sample", + "origin": "API_DEFINITION", + "description": " Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.", + "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_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_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" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-container/src/index.ts b/packages/google-container/src/index.ts index 3bfe04f539b..78006a94a5a 100644 --- a/packages/google-container/src/index.ts +++ b/packages/google-container/src/index.ts @@ -17,11 +17,12 @@ // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; +import * as v1beta1 from './v1beta1'; const ClusterManagerClient = v1.ClusterManagerClient; type ClusterManagerClient = v1.ClusterManagerClient; -export {v1, ClusterManagerClient}; -export default {v1, ClusterManagerClient}; +export {v1, v1beta1, ClusterManagerClient}; +export default {v1, v1beta1, ClusterManagerClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-container/src/v1/cluster_manager_client.ts b/packages/google-container/src/v1/cluster_manager_client.ts index 0e971e3584e..47a53716325 100644 --- a/packages/google-container/src/v1/cluster_manager_client.ts +++ b/packages/google-container/src/v1/cluster_manager_client.ts @@ -119,6 +119,9 @@ export class ClusterManagerClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -828,6 +831,8 @@ export class ClusterManagerClient { * 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 {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 diff --git a/packages/google-container/src/v1beta1/cluster_manager_client.ts b/packages/google-container/src/v1beta1/cluster_manager_client.ts new file mode 100644 index 00000000000..07821bf0dab --- /dev/null +++ b/packages/google-container/src/v1beta1/cluster_manager_client.ts @@ -0,0 +1,4189 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + 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}; + 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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ClusterManagerClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ClusterManagerClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // 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', + 'listNodePools', + 'getJsonWebKeys', + 'getNodePool', + 'createNodePool', + 'deleteNodePool', + 'completeNodePoolUpgrade', + 'rollbackNodePoolUpgrade', + 'setNodePoolManagement', + 'setLabels', + 'setLegacyAbac', + 'startIpRotation', + 'completeIpRotation', + 'setNodePoolSize', + 'setNetworkPolicy', + 'setMaintenancePolicy', + 'listUsableSubnetworks', + '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. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'container.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'container.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * 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 [ListClustersResponse]{@link google.container.v1beta1.ListClustersResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Cluster]{@link google.container.v1beta1.Cluster}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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. + * @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 {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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [ListOperationsResponse]{@link google.container.v1beta1.ListOperationsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/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 [ServerConfig]{@link google.container.v1beta1.ServerConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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); + } + /** + * 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 [ListNodePoolsResponse]{@link google.container.v1beta1.ListNodePoolsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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); + } + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * This API is not yet intended for general use, and is not available for all + * clusters. + * + * @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 [GetJSONWebKeysResponse]{@link google.container.v1beta1.GetJSONWebKeysResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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); + } + /** + * 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 [NodePool]{@link google.container.v1beta1.NodePool}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [Operation]{@link google.container.v1beta1.Operation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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); + } + /** + * 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 [ListLocationsResponse]{@link google.container.v1beta1.ListLocationsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/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 [UsableSubnetwork]{@link google.container.v1beta1.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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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 [UsableSubnetwork]{@link google.container.v1beta1.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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [UsableSubnetwork]{@link google.container.v1beta1.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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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/packages/google-container/src/v1beta1/cluster_manager_client_config.json b/packages/google-container/src/v1beta1/cluster_manager_client_config.json new file mode 100644 index 00000000000..27fa3c1f158 --- /dev/null +++ b/packages/google-container/src/v1beta1/cluster_manager_client_config.json @@ -0,0 +1,194 @@ +{ + "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" + }, + "ListNodePools": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetJSONWebKeys": { + "retry_codes_name": "non_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" + }, + "ListLocations": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-container/src/v1beta1/cluster_manager_proto_list.json b/packages/google-container/src/v1beta1/cluster_manager_proto_list.json new file mode 100644 index 00000000000..7a594ccf698 --- /dev/null +++ b/packages/google-container/src/v1beta1/cluster_manager_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/container/v1beta1/cluster_service.proto" +] diff --git a/packages/google-container/src/v1beta1/gapic_metadata.json b/packages/google-container/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..21241d45ef6 --- /dev/null +++ b/packages/google-container/src/v1beta1/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.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" + ] + }, + "ListNodePools": { + "methods": [ + "listNodePools" + ] + }, + "GetJSONWebKeys": { + "methods": [ + "getJSONWebKeys" + ] + }, + "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" + ] + }, + "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" + ] + }, + "ListNodePools": { + "methods": [ + "listNodePools" + ] + }, + "GetJSONWebKeys": { + "methods": [ + "getJSONWebKeys" + ] + }, + "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" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "ListUsableSubnetworks": { + "methods": [ + "listUsableSubnetworks", + "listUsableSubnetworksStream", + "listUsableSubnetworksAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-container/src/v1beta1/index.ts b/packages/google-container/src/v1beta1/index.ts new file mode 100644 index 00000000000..7952088fe56 --- /dev/null +++ b/packages/google-container/src/v1beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {ClusterManagerClient} from './cluster_manager_client'; diff --git a/packages/google-container/test/gapic_cluster_manager_v1beta1.ts b/packages/google-container/test/gapic_cluster_manager_v1beta1.ts new file mode 100644 index 00000000000..82c1ce58dfe --- /dev/null +++ b/packages/google-container/test/gapic_cluster_manager_v1beta1.ts @@ -0,0 +1,6767 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as 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 servicePath', () => { + const servicePath = + clustermanagerModule.v1beta1.ClusterManagerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + clustermanagerModule.v1beta1.ClusterManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + + 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('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('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('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('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 + ) + ); + }); + }); +});