From e003fded36defe05f452b02cd59e54b4b1b67270 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 15 Dec 2023 19:57:10 +0000 Subject: [PATCH 1/2] feat: added proxy support for Attached Clusters feat: added Binary Authorization support which is a deploy-time security control that ensures only trusted container images are deployed feat: added support for a new admin-groups flag in the create and update APIs feat: added Surge Update and Rollback support for AWS Node Pools feat: added support for per-node-pool subnet security group rules for AWS Node Pools feat: added support for EC2 Spot instance types for AWS Node Pools feat: added force-deletion support for AWS Clusters & Node Pools feat: expanded Kubernetes version info docs: updated comments of existing fields PiperOrigin-RevId: 591286857 Source-Link: https://github.com/googleapis/googleapis/commit/91bd79262abf9788b671e3e6716f6b0b3e793150 Source-Link: https://github.com/googleapis/googleapis-gen/commit/afb34ad26ec637c1d5f983dd1d92ee5d4b5bd64f Copy-Tag: eyJwIjoiR2tlTXVsdGlDbG91ZC8uT3dsQm90LnlhbWwiLCJoIjoiYWZiMzRhZDI2ZWM2MzdjMWQ1Zjk4M2RkMWQ5MmVlNWQ0YjViZDY0ZiJ9 --- .../Gkemulticloud/V1/AttachedResources.php | Bin 0 -> 3628 bytes .../Gkemulticloud/V1/AttachedService.php | 113 + .../Cloud/Gkemulticloud/V1/AwsResources.php | Bin 0 -> 8270 bytes .../Cloud/Gkemulticloud/V1/AwsService.php | 156 ++ .../Cloud/Gkemulticloud/V1/AzureResources.php | Bin 0 -> 8085 bytes .../Cloud/Gkemulticloud/V1/AzureService.php | 173 ++ .../Gkemulticloud/V1/CommonResources.php | Bin 0 -> 2515 bytes .../GkeMultiCloud/V1/AttachedCluster.php | 965 +++++++ .../V1/AttachedCluster/State.php | 96 + .../GkeMultiCloud/V1/AttachedClusterError.php | 67 + .../GkeMultiCloud/V1/AttachedClusterGroup.php | 67 + .../GkeMultiCloud/V1/AttachedClusterUser.php | 67 + .../V1/AttachedClustersAuthorization.php | 133 + .../GkeMultiCloud/V1/AttachedOidcConfig.php | 129 + .../V1/AttachedPlatformVersionInfo.php | 67 + .../GkeMultiCloud/V1/AttachedProxyConfig.php | 85 + .../GkeMultiCloud/V1/AttachedServerConfig.php | 102 + .../GkeMultiCloud/V1/AwsAuthorization.php | 133 + .../AwsAutoscalingGroupMetricsCollection.php | 118 + .../Cloud/GkeMultiCloud/V1/AwsCluster.php | 923 +++++++ .../GkeMultiCloud/V1/AwsCluster/State.php | 96 + .../GkeMultiCloud/V1/AwsClusterError.php | 67 + .../GkeMultiCloud/V1/AwsClusterGroup.php | 67 + .../GkeMultiCloud/V1/AwsClusterNetworking.php | 211 ++ .../Cloud/GkeMultiCloud/V1/AwsClusterUser.php | 67 + .../GkeMultiCloud/V1/AwsConfigEncryption.php | 67 + .../GkeMultiCloud/V1/AwsControlPlane.php | 693 +++++ .../V1/AwsDatabaseEncryption.php | 67 + .../GkeMultiCloud/V1/AwsInstancePlacement.php | 70 + .../V1/AwsInstancePlacement/Tenancy.php | 75 + .../Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php | 71 + .../GkeMultiCloud/V1/AwsK8sVersionInfo.php | 255 ++ .../Cloud/GkeMultiCloud/V1/AwsNodeConfig.php | 663 +++++ .../GkeMultiCloud/V1/AwsNodeManagement.php | 80 + .../Cloud/GkeMultiCloud/V1/AwsNodePool.php | 727 ++++++ .../GkeMultiCloud/V1/AwsNodePool/State.php | 95 + .../V1/AwsNodePoolAutoscaling.php | 110 + .../GkeMultiCloud/V1/AwsNodePoolError.php | 67 + .../GkeMultiCloud/V1/AwsOpenIdConfig.php | 272 ++ .../Cloud/GkeMultiCloud/V1/AwsProxyConfig.php | 121 + .../GkeMultiCloud/V1/AwsServerConfig.php | 147 ++ .../V1/AwsServicesAuthentication.php | 109 + .../Cloud/GkeMultiCloud/V1/AwsSshConfig.php | 67 + .../GkeMultiCloud/V1/AwsVolumeTemplate.php | 239 ++ .../V1/AwsVolumeTemplate/VolumeType.php | 67 + .../GkeMultiCloud/V1/AzureAuthorization.php | 133 + .../Cloud/GkeMultiCloud/V1/AzureClient.php | 411 +++ .../Cloud/GkeMultiCloud/V1/AzureCluster.php | 1087 ++++++++ .../GkeMultiCloud/V1/AzureCluster/State.php | 96 + .../GkeMultiCloud/V1/AzureClusterError.php | 67 + .../GkeMultiCloud/V1/AzureClusterGroup.php | 67 + .../V1/AzureClusterNetworking.php | 241 ++ .../V1/AzureClusterResources.php | 102 + .../GkeMultiCloud/V1/AzureClusterUser.php | 67 + .../V1/AzureConfigEncryption.php | 131 + .../GkeMultiCloud/V1/AzureControlPlane.php | 613 +++++ .../V1/AzureDatabaseEncryption.php | 85 + .../GkeMultiCloud/V1/AzureDiskTemplate.php | 75 + .../GkeMultiCloud/V1/AzureJsonWebKeys.php | 71 + .../GkeMultiCloud/V1/AzureK8sVersionInfo.php | 255 ++ .../GkeMultiCloud/V1/AzureNodeConfig.php | 432 ++++ .../GkeMultiCloud/V1/AzureNodeManagement.php | 80 + .../Cloud/GkeMultiCloud/V1/AzureNodePool.php | 713 ++++++ .../GkeMultiCloud/V1/AzureNodePool/State.php | 95 + .../V1/AzureNodePoolAutoscaling.php | 111 + .../GkeMultiCloud/V1/AzureNodePoolError.php | 67 + .../GkeMultiCloud/V1/AzureOpenIdConfig.php | 272 ++ .../GkeMultiCloud/V1/AzureProxyConfig.php | 129 + .../GkeMultiCloud/V1/AzureServerConfig.php | 164 ++ .../V1/AzureServicesAuthentication.php | 101 + .../Cloud/GkeMultiCloud/V1/AzureSshConfig.php | 75 + .../GkeMultiCloud/V1/BinaryAuthorization.php | 71 + .../V1/BinaryAuthorization/EvaluationMode.php | 65 + .../V1/CreateAttachedClusterRequest.php | 261 ++ .../V1/CreateAwsClusterRequest.php | 261 ++ .../V1/CreateAwsNodePoolRequest.php | 265 ++ .../V1/CreateAzureClientRequest.php | 261 ++ .../V1/CreateAzureClusterRequest.php | 261 ++ .../V1/CreateAzureNodePoolRequest.php | 265 ++ .../V1/DeleteAttachedClusterRequest.php | 292 +++ .../V1/DeleteAwsClusterRequest.php | 288 +++ .../V1/DeleteAwsNodePoolRequest.php | 292 +++ .../V1/DeleteAzureClientRequest.php | 197 ++ .../V1/DeleteAzureClusterRequest.php | 242 ++ .../V1/DeleteAzureNodePoolRequest.php | 250 ++ .../Google/Cloud/GkeMultiCloud/V1/Fleet.php | 131 + ...nerateAttachedClusterAgentTokenRequest.php | 337 +++ ...erateAttachedClusterAgentTokenResponse.php | 112 + ...eAttachedClusterInstallManifestRequest.php | 289 +++ ...AttachedClusterInstallManifestResponse.php | 72 + .../V1/GenerateAwsAccessTokenRequest.php | 91 + .../V1/GenerateAwsAccessTokenResponse.php | 111 + .../GenerateAwsClusterAgentTokenRequest.php | 371 +++ .../GenerateAwsClusterAgentTokenResponse.php | 112 + .../V1/GenerateAzureAccessTokenRequest.php | 91 + .../V1/GenerateAzureAccessTokenResponse.php | 111 + .../GenerateAzureClusterAgentTokenRequest.php | 371 +++ ...GenerateAzureClusterAgentTokenResponse.php | 112 + .../V1/GetAttachedClusterRequest.php | 113 + .../V1/GetAttachedServerConfigRequest.php | 114 + .../GkeMultiCloud/V1/GetAwsClusterRequest.php | 113 + .../V1/GetAwsJsonWebKeysRequest.php | 78 + .../V1/GetAwsNodePoolRequest.php | 113 + .../V1/GetAwsOpenIdConfigRequest.php | 76 + .../V1/GetAwsServerConfigRequest.php | 113 + .../V1/GetAzureClientRequest.php | 118 + .../V1/GetAzureClusterRequest.php | 113 + .../V1/GetAzureJsonWebKeysRequest.php | 94 + .../V1/GetAzureNodePoolRequest.php | 113 + .../V1/GetAzureOpenIdConfigRequest.php | 92 + .../V1/GetAzureServerConfigRequest.php | 113 + .../V1/ImportAttachedClusterRequest.php | 306 +++ .../src/Google/Cloud/GkeMultiCloud/V1/Jwk.php | 339 +++ .../GkeMultiCloud/V1/KubernetesSecret.php | 101 + .../V1/ListAttachedClustersRequest.php | 199 ++ .../V1/ListAttachedClustersResponse.php | 109 + .../V1/ListAwsClustersRequest.php | 199 ++ .../V1/ListAwsClustersResponse.php | 109 + .../V1/ListAwsNodePoolsRequest.php | 204 ++ .../V1/ListAwsNodePoolsResponse.php | 109 + .../V1/ListAzureClientsRequest.php | 199 ++ .../V1/ListAzureClientsResponse.php | 109 + .../V1/ListAzureClustersRequest.php | 199 ++ .../V1/ListAzureClustersResponse.php | 109 + .../V1/ListAzureNodePoolsRequest.php | 204 ++ .../V1/ListAzureNodePoolsResponse.php | 109 + .../V1/LoggingComponentConfig.php | 67 + .../V1/LoggingComponentConfig/Component.php | 64 + .../Cloud/GkeMultiCloud/V1/LoggingConfig.php | 77 + .../V1/ManagedPrometheusConfig.php | 68 + .../GkeMultiCloud/V1/MaxPodsConstraint.php | 67 + .../GkeMultiCloud/V1/MonitoringConfig.php | 77 + .../Cloud/GkeMultiCloud/V1/NodeTaint.php | 135 + .../GkeMultiCloud/V1/NodeTaint/Effect.php | 77 + .../GkeMultiCloud/V1/OperationMetadata.php | 315 +++ .../GkeMultiCloud/V1/ReplicaPlacement.php | 113 + .../V1/RollbackAwsNodePoolUpdateRequest.php | 151 ++ .../Cloud/GkeMultiCloud/V1/SpotConfig.php | 67 + .../Cloud/GkeMultiCloud/V1/SurgeSettings.php | 113 + .../V1/UpdateAttachedClusterRequest.php | 246 ++ .../V1/UpdateAwsClusterRequest.php | 321 +++ .../V1/UpdateAwsNodePoolRequest.php | 336 +++ .../V1/UpdateAzureClusterRequest.php | 271 ++ .../V1/UpdateAzureNodePoolRequest.php | 221 ++ .../Cloud/GkeMultiCloud/V1/UpdateSettings.php | 96 + .../V1/WorkloadIdentityConfig.php | 139 + .../create_attached_cluster.php | 145 ++ .../delete_attached_cluster.php | 96 + .../generate_attached_cluster_agent_token.php | 93 + ...rate_attached_cluster_install_manifest.php | 109 + .../get_attached_cluster.php | 84 + .../get_attached_server_config.php | 80 + .../import_attached_cluster.php | 118 + .../list_attached_clusters.php | 83 + .../update_attached_cluster.php | 117 + .../AwsClustersClient/create_aws_cluster.php | 220 ++ .../create_aws_node_pool.php | 168 ++ .../AwsClustersClient/delete_aws_cluster.php | 95 + .../delete_aws_node_pool.php | 97 + .../generate_aws_access_token.php | 84 + .../generate_aws_cluster_agent_token.php | 93 + .../V1/AwsClustersClient/get_aws_cluster.php | 80 + .../get_aws_json_web_keys.php | 78 + .../AwsClustersClient/get_aws_node_pool.php | 85 + .../get_aws_open_id_config.php | 81 + .../get_aws_server_config.php | 80 + .../AwsClustersClient/list_aws_clusters.php | 83 + .../AwsClustersClient/list_aws_node_pools.php | 85 + .../rollback_aws_node_pool_update.php | 101 + .../AwsClustersClient/update_aws_cluster.php | 192 ++ .../update_aws_node_pool.php | 140 + .../create_azure_client.php | 127 + .../create_azure_cluster.php | 213 ++ .../create_azure_node_pool.php | 166 ++ .../delete_azure_client.php | 96 + .../delete_azure_cluster.php | 99 + .../delete_azure_node_pool.php | 97 + .../generate_azure_access_token.php | 84 + .../generate_azure_cluster_agent_token.php | 93 + .../AzureClustersClient/get_azure_client.php | 81 + .../AzureClustersClient/get_azure_cluster.php | 84 + .../get_azure_json_web_keys.php | 78 + .../get_azure_node_pool.php | 85 + .../get_azure_open_id_config.php | 81 + .../get_azure_server_config.php | 80 + .../list_azure_clients.php | 83 + .../list_azure_clusters.php | 83 + .../list_azure_node_pools.php | 89 + .../update_azure_cluster.php | 185 ++ .../update_azure_node_pool.php | 133 + .../v1/src/V1/AttachedClustersClient.php | 34 + .../v1/src/V1/AwsClustersClient.php | 34 + .../v1/src/V1/AzureClustersClient.php | 34 + .../src/V1/Client/AttachedClustersClient.php | 572 +++++ .../v1/src/V1/Client/AwsClustersClient.php | 802 ++++++ .../v1/src/V1/Client/AzureClustersClient.php | 922 +++++++ .../V1/Gapic/AttachedClustersGapicClient.php | 1123 ++++++++ .../src/V1/Gapic/AwsClustersGapicClient.php | 1666 ++++++++++++ .../src/V1/Gapic/AzureClustersGapicClient.php | 1890 ++++++++++++++ .../v1/src/V1/gapic_metadata.json | 256 ++ .../attached_clusters_client_config.json | 89 + .../attached_clusters_descriptor_config.php | 158 ++ .../attached_clusters_rest_client_config.php | 165 ++ .../resources/aws_clusters_client_config.json | 124 + .../aws_clusters_descriptor_config.php | 273 ++ .../aws_clusters_rest_client_config.php | 251 ++ .../azure_clusters_client_config.json | 139 + .../azure_clusters_descriptor_config.php | 325 +++ .../azure_clusters_rest_client_config.php | 287 +++ .../Unit/V1/AttachedClustersClientTest.php | 1007 ++++++++ .../tests/Unit/V1/AwsClustersClientTest.php | 1824 +++++++++++++ .../tests/Unit/V1/AzureClustersClientTest.php | 2065 +++++++++++++++ .../V1/Client/AttachedClustersClientTest.php | 1174 +++++++++ .../Unit/V1/Client/AwsClustersClientTest.php | 2046 +++++++++++++++ .../V1/Client/AzureClustersClientTest.php | 2270 +++++++++++++++++ 215 files changed, 50528 insertions(+) create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/AwsClustersClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/AzureClustersClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php create mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php new file mode 100644 index 0000000000000000000000000000000000000000..93800c00950918742b46d2b89b7b5ae293b3232f GIT binary patch literal 3628 zcmbVP>rNX-6s~PdU`&YFCh3Ll_~si-YTT189J$bfO&1Z0&YPF#(fgBiAOlGT=EXK_{`{9Zh(R1qHQd6wJS!hy|*&natwscH5wPjV}M zS$-I~6?CL)EUOqz^Fol%49-G4?AAkiIve=NIw6#q z=3rL?lK+CnNxeGi@@lmwK!4pr-~2zdYD)@Nl)5gCsJwWxx_Bp|wR}>Fg|2kI`1r#fp}!zU(hXoUwb?O z8Sg7fVsTGk1ye@LqfAH~{n{WZ$SK2+Hk-J_>*+JFGNWuCqnyn!K-;2H`mBt4G4>so zv6u)tL4`idy$FS_hJrf7xa{dU5t#Nl(vHIpOd-s1kd$CftSKiyqMYS*T>FLK22IXN6mCZU@fLTD`3>n(-XOg`%fqf^z4R3k}&4KdXCKb^o*V+WG zcX;#uspJ(_?!SEAjJ(2Lt%TtoSBb!j=2ImV~aB)g8XCzcyxHN(vG zlT;x@S=p%CEwr$=U*4~@4|ew&mCf3At+JK>1X_2l(X1cV_G*32gI)QN z)^4C&v$9#=-K@P5s~H%bGkg2>Mnil}X|pI>X*TQ4d{!)MRjSSM7SK+czq~J>p_S3` zuf`@!{-6lMycB0I9?CDF0ngVI^_-+9TUwra-GS^V#La#M)OIW81U!t31){;uoP*%pHq|x>=Io$Rntndis$A23u)B>7KUKi2D=g$hJM-D|!QoN6^5c1+Sp@X+u$%rbL2+)u6CwD9-KaUklcV*)T?6X5h5;0#J=PK NA}!T3;T)YK^e>@ts)Yam literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php new file mode 100644 index 000000000000..201ec24b7e06 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php @@ -0,0 +1,113 @@ +internalAddGeneratedFile( + ' +º( +4google/cloud/gkemulticloud/v1/attached_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/gkemulticloud/v1/attached_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"… +-GenerateAttachedClusterInstallManifestRequestD +parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster +attached_cluster_id ( BàA +platform_version ( BàAM + proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"B +.GenerateAttachedClusterInstallManifestResponse +manifest ( "ì +CreateAttachedClusterRequestD +parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedClusterM +attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA +attached_cluster_id ( BàA + validate_only ("£ +ImportAttachedClusterRequestD +parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster + validate_only ( +fleet_membership ( BàA +platform_version ( BàA + distribution ( BàAM + proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"º +UpdateAttachedClusterRequestM +attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA + validate_only (4 + update_mask ( 2.google.protobuf.FieldMaskBàA"_ +GetAttachedClusterRequestB +name ( B4àAúA. +,gkemulticloud.googleapis.com/AttachedCluster"Š +ListAttachedClustersRequestD +parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster + page_size ( + +page_token ( "‚ +ListAttachedClustersResponseI +attached_clusters ( 2..google.cloud.gkemulticloud.v1.AttachedCluster +next_page_token ( "µ +DeleteAttachedClusterRequestB +name ( B4àAúA. +,gkemulticloud.googleapis.com/AttachedCluster + validate_only ( + allow_missing ( + ignore_errors ( +etag ( "i +GetAttachedServerConfigRequestG +name ( B9àAúA3 +1gkemulticloud.googleapis.com/AttachedServerConfig"Ê +(GenerateAttachedClusterAgentTokenRequestN +attached_cluster ( B4àAúA. +,gkemulticloud.googleapis.com/AttachedCluster + subject_token ( BàA +subject_token_type ( BàA +version ( BàA + +grant_type ( BàA +audience ( BàA +scope ( BàA! +requested_token_type ( BàA +options + ( BàA"i +)GenerateAttachedClusterAgentTokenResponse + access_token (  + +expires_in ( + +token_type ( 2Ý +AttachedClusters™ +CreateAttachedCluster;.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.google.longrunning.Operation"£‚Óä“H"4/v1/{parent=projects/*/locations/*}/attachedClusters:attached_clusterÚA+parent,attached_cluster,attached_cluster_idÊA$ +AttachedClusterOperationMetadata› +UpdateAttachedCluster;.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.google.longrunning.Operation"¥‚Óä“Y2E/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}:attached_clusterÚAattached_cluster,update_maskÊA$ +AttachedClusterOperationMetadataý +ImportAttachedCluster;.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.google.longrunning.Operation"‡‚Óä“@";/v1/{parent=projects/*/locations/*}/attachedClusters:import:*ÚAparent,fleet_membershipÊA$ +AttachedClusterOperationMetadataà +GetAttachedCluster8.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest..google.cloud.gkemulticloud.v1.AttachedCluster"C‚Óä“64/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÖ +ListAttachedClusters:.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse"E‚Óä“64/v1/{parent=projects/*/locations/*}/attachedClustersÚAparentå +DeleteAttachedCluster;.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.google.longrunning.Operation"p‚Óä“6*4/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataÔ +GetAttachedServerConfig=.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest3.google.cloud.gkemulticloud.v1.AttachedServerConfig"E‚Óä“86/v1/{name=projects/*/locations/*/attachedServerConfig}ÚAname¶ +&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"o‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifestÚAparent,attached_cluster_id¥ +!GenerateAttachedClusterAgentTokenG.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequestH.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenResponse"m‚Óä“g"b/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken:*PÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBç +!com.google.cloud.gkemulticloud.v1BAttachedServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php new file mode 100644 index 0000000000000000000000000000000000000000..4163515796ab81495e740bfb47708ca138d7decf GIT binary patch literal 8270 zcmdT}&2rnw5e}(8t0~D6{71`c8w-2Oa;;5STqkkpby5^X%UoL`BT?GggcTGBjwq}^ z0EGc$YhAkKl*7J3uBjx~7D^dkdha)E0^#@0Mk7)J>6e_-Sg!y zyh9J}sGH1Tz7epF+CEW(L#BGZ8@Q%xtL^aMfcdKF_B_jGenC|?>gsmAsa7{?%}-I3 zyPx$7`#`Yp(lDj^zcR9l$YqjC+R3)Xm2F77L7y z5g4sap{P|MMXk-GqSpS}QvlO8I9JQB`A)14-hzrhFKpYEsq(LC3V(;x+2$DDxF#6Gd1u-mYiKxeHMhi^Hi*x6rA?| zwa&3y*|S>DEoOJt*`aZ4xqhiM*wsME`$S`-jxTloLA5Gwuje|kIzGO>zImG#x<_F2 zyzyn5Cmw5Upd+6zB2Mz*&#ma(%AHRCn4Y6|uk;N|X1)ji{28o$uv;rPrAR^eeqksQ z3dd{9*CUOFXRXE&Ap>Ih@efaiF^Co&4Ws4Tk(3B3bj#Hswp*n3YBV4~0}{*mQ$^Aq?X zSNx(N=XlSi3xjF4`=X>Rt6T$+*wCeECgW+c%2zONx=!G`w(i-6!}3#NrotFANwEe= z$w^+qyb%V6u5W#Z*nsm~6uMT^b(NE1QdtG2D12Fd29+!n$50YkxUfrNq+~+50vDLm z@mzGp{DpYa6Urh?gjOd%J9vZV;4?IYY1w3Mz%Li1ipP*MeTEu!I`DiBzvPO`@s?t5 zDD-=%b9A8J`wMe=mgyqKXz*SRvx^5b} z$^5`NuuM9~CEAo6^aQ33Y{r7TBIdiBGT(C=OOjco1`D>^?cy25OTHvjJV;UTN(v2D zno%k+&3xbWdH%An>^LqjcUC1axsy69Ay`_`F=d3|`^+to9CY4#3s_yL6cNVAU!$x&;r@Vn`r%Ud;vJI_!!-y_%55b%l5T92EK&O;3 z1ixiwz*pZ!|4vtJ7d?)GX7z3S_msF%gb?_ez%cUDQ|*s4aFH}708P0JGsn#5gkl1z zrTZgry&?YacEVCv6*?>C7?x6HlZMLg8HTar*j@iU{Fq zUsfL1OPEAB_HL152iW<)lFgf^)?*5RsvP>0s2HO;85jWn)3n!}UiP zJ_a?ZMV^U_L5k9zGs~aDY~RwUn6v}eDQ3HOLY&uFc2Iz`Y^JSKJ(3JSSt<`D>vZUe*M+nR#k6)(-_TkGcd8)C}M&Wf4*4E zYJbYW<-t)5*tT*BrjI=nu{mL9UN^I#`Ne;;}lu-p0&yB;6rG=M}htM@isv z?#PK4>a)rNxa~1tciaxsscP1FSNB63L8)VLqiwT}Fo9sO8SVR7$l+SIaWqxQBNa#@ z(NU2Rt)&dp5u2+T<1SCRe!0%estMo<{I+{DfRQtInMPa3sMtP|rg78XveT!qr=~DUzi^R1+jv>PSsMT=o2#KvK{TtqCp*gQQBuH35;zSp_31 zSrc3pU@}HT^>;kV0%b()z@?t?27Rf6-if>^@G-Rq`5R)1X#`=*c+)^ZJo`va9@j>n zU*8m~Oyk3eqfZd*8bHr*jIPWzx5ipfq-m=!CpY;LE=DyOXF-5I$@8kvmj>&5qLSN< zgoLvHCqn&w=3V)B8CXeU)Ul5!zln(S$5Uz|+p)TcZ96eoooc^^g<+FYS;s@a%aC0~ zCqtw=S4@MQT@o5P7_AEPLvIN-$hU?5WODihF4FtZF^&z(Ce##cUgiz$p-6MIhk+YW zS|mur-jHWlzEBon?0;rpK5{#Wfy$Xup=uJ3oWzfP$6MAu)@Ul=Mnl zYLb8qiY=JNy)#?Z8e@@U(jYfkcqK#=B)JwbZmLUi#h;|CWyoTqeEWU%Oal2a>svj< z21zfdH6zkjMj5WfWNq@{wb=P37vR>SX-4U~tO3&C1b00iU8gqC|D3MN!t|r*y5hmD zL|WH-EbuLpvW9JA6;AcC?D|#G&pwgi1xLlZ3DQ;RtCB8SfgJa+YQ@Af=uzEIQNN24 z(n%#=KZIPuS<~u_4=qZrMxIRkDzPhMl?zlu2<$W65K}6lfPk2+_=o_M_((t?KWcx^ z2nt{Km{aRSkg@>N7Uv<8$TN!#mh#n24ZB4iL=-gEoYU`qc`HH*F*R1`Lop9w5Ok$Z4S6Eugv3~XXNc*=m%`S3f z=0~O(?yA3l1zav}BWmHqRaY95!Bc$sgzw9~Pt7@Sm78#-zc1Yow`(EMn`T@x`DX9H5BT~}H0xypAsi<+q99aVppO^WGG8Z<&b@xEGtpg@50HQCC zU@`GUr=E3m2e1^M1$DX#SS2zUj}KtZXEvi|jTlXUoGZR(w00ln(5(F~mvSBEm{}C1 zWj~3^qC@*qI7b2-v1kQsdg0C7pbW))z7V~O8+4+U*H+;YP9*(d(7E`5QuZ&hhC9=i zP<{zB0ou?pWpi|_lJ$(1LQ|?Bn`N~ZFcUrFRm`Pkb-TP>`DUb_irv$V>htp6t0q>O z^Dv9;&{_rCt{aP4~(p?#c%vT6kIhE~`ovrIL^;m4=3tO8aZ=X^i^7{o-E#>hpoT ZflgdlW7`&+iRWBai;?n5`4mn8{tKexMD73p literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php new file mode 100644 index 000000000000..1b138f920d2d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php @@ -0,0 +1,156 @@ +internalAddGeneratedFile( + ' +Ž9 +/google/cloud/gkemulticloud/v1/aws_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/gkemulticloud/v1/aws_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ó +CreateAwsClusterRequest? +parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsClusterC + aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA +aws_cluster_id ( BàA + validate_only ("« +UpdateAwsClusterRequestC + aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA + validate_only (4 + update_mask ( 2.google.protobuf.FieldMaskBàA"U +GetAwsClusterRequest= +name ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster"€ +ListAwsClustersRequest? +parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsCluster + page_size ( + +page_token ( "s +ListAwsClustersResponse? + aws_clusters ( 2).google.cloud.gkemulticloud.v1.AwsCluster +next_page_token ( "° +DeleteAwsClusterRequest= +name ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster + validate_only ( + allow_missing ( + ignore_errors (BàA +etag ( "Ú +CreateAwsNodePoolRequest@ +parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePoolF + aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA +aws_node_pool_id ( BàA + validate_only ("¯ +UpdateAwsNodePoolRequestF + aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA + validate_only (4 + update_mask ( 2.google.protobuf.FieldMaskBàA"| + RollbackAwsNodePoolUpdateRequest> +name ( B0àAúA* +(gkemulticloud.googleapis.com/AwsNodePool + respect_pdb (BàA"W +GetAwsNodePoolRequest> +name ( B0àAúA* +(gkemulticloud.googleapis.com/AwsNodePool"‚ +ListAwsNodePoolsRequest@ +parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePool + page_size ( + +page_token ( "w +ListAwsNodePoolsResponseB +aws_node_pools ( 2*.google.cloud.gkemulticloud.v1.AwsNodePool +next_page_token ( "² +DeleteAwsNodePoolRequest> +name ( B0àAúA* +(gkemulticloud.googleapis.com/AwsNodePool + validate_only ( + allow_missing ( + ignore_errors (BàA +etag ( "a +GetAwsOpenIdConfigRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster"` +GetAwsJsonWebKeysRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster"_ +GetAwsServerConfigRequestB +name ( B4àAúA. +,gkemulticloud.googleapis.com/AwsServerConfig"e +GenerateAwsAccessTokenRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster"u +GenerateAwsAccessTokenResponse + access_token ( BàA8 +expiration_time ( 2.google.protobuf.TimestampBàA"Ö +#GenerateAwsClusterAgentTokenRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster + subject_token ( BàA +subject_token_type ( BàA +version ( BàA + node_pool_id ( BàA + +grant_type ( BàA +audience ( BàA +scope ( BàA! +requested_token_type ( BàA +options + ( BàA"d +$GenerateAwsClusterAgentTokenResponse + access_token (  + +expires_in ( + +token_type ( 2© + AwsClustersö +CreateAwsCluster6.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.google.longrunning.Operation"Š‚Óä“>"//v1/{parent=projects/*/locations/*}/awsClusters: aws_clusterÚA!parent,aws_cluster,aws_cluster_idÊA + +AwsClusterOperationMetadataø +UpdateAwsCluster6.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.google.longrunning.Operation"Œ‚Óä“J2;/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}: aws_clusterÚAaws_cluster,update_maskÊA + +AwsClusterOperationMetadata¯ + GetAwsCluster3.google.cloud.gkemulticloud.v1.GetAwsClusterRequest).google.cloud.gkemulticloud.v1.AwsCluster">‚Óä“1//v1/{name=projects/*/locations/*/awsClusters/*}ÚAname +ListAwsClusters5.google.cloud.gkemulticloud.v1.ListAwsClustersRequest6.google.cloud.gkemulticloud.v1.ListAwsClustersResponse"@‚Óä“1//v1/{parent=projects/*/locations/*}/awsClustersÚAparentÖ +DeleteAwsCluster6.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.google.longrunning.Operation"k‚Óä“1*//v1/{name=projects/*/locations/*/awsClusters/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata‡ +GenerateAwsClusterAgentTokenB.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequestC.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenResponse"^‚Óä“X"S/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken:*ì +GenerateAwsAccessToken<.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest=.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse"U‚Óä“OM/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessTokenŽ +CreateAwsNodePool7.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.google.longrunning.Operation" ‚Óä“O">/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools: aws_node_poolÚA%parent,aws_node_pool,aws_node_pool_idÊA + AwsNodePoolOperationMetadata +UpdateAwsNodePool7.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.google.longrunning.Operation"¢‚Óä“]2L/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}: aws_node_poolÚAaws_node_pool,update_maskÊA + AwsNodePoolOperationMetadataù +RollbackAwsNodePoolUpdate?.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest.google.longrunning.Operation"|‚Óä“L"G/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback:*ÚAnameÊA + AwsNodePoolOperationMetadataÁ +GetAwsNodePool4.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest*.google.cloud.gkemulticloud.v1.AwsNodePool"M‚Óä“@>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ÚAnameÔ +ListAwsNodePools6.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest7.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"O‚Óä“@>/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePoolsÚAparentç +DeleteAwsNodePool7.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.google.longrunning.Operation"z‚Óä“@*>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataß +GetAwsOpenIdConfig8.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest..google.cloud.gkemulticloud.v1.AwsOpenIdConfig"_‚Óä“YW/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configurationÀ +GetAwsJsonWebKeys7.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest-.google.cloud.gkemulticloud.v1.AwsJsonWebKeys"C‚Óä“=;/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwksÀ +GetAwsServerConfig8.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest..google.cloud.gkemulticloud.v1.AwsServerConfig"@‚Óä“31/v1/{name=projects/*/locations/*/awsServerConfig}ÚAnamePÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBâ +!com.google.cloud.gkemulticloud.v1BAwsServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php new file mode 100644 index 0000000000000000000000000000000000000000..5666e4e33faa7ac2f5a4f2c3cb5f5dd5fe15e9c7 GIT binary patch literal 8085 zcmc&(Pg5J&5sxIm(83sowLQl1dUnzNCRHagtTlPETo}6>a!5<wf+Eb^rR;{l5N% zd*s5W$~Lo^rw6Q~v`>}bh$*h;1dicYN;~X!nWq>|-!(1fRTO1&PubmTDz(je^Ai;H zozOE_Rp~iS&tfZv<%FG;-ZATkR$z)>C#x&^+t6d0$HZ#C!u12#dY}2OZZKuL@pOj; zdPfiR);3qw+8|Y}?X0TS;p$@m!_s|UStphIu}1h76#VCgZOb$iKhSY=<&NoVrfmkM zZkccKa8H!3ZutyVoL}1wZ6h!pTOolx+hEK06rq#W-fz&u;G zTAR!_Jkt#vuYpUe)gB8HuhL(Z??u~^Iv$bV1tMil{=_jV+RjcW#QYG&bjh&ibYV=jLHk^Lnv14_9etn61nAeDHHKy0`UCC%L9AjPT{evE=5v@W)5+)dz&ObV~?Tcm`Ak z@}Y9Fx^yGbsk`P%oE0J|mL7ipc9@Ci)8SNFx*bXJ#KOQ_31ZJhYOh5L0(8#`rWq4| zSN}c>vpkhHtkB0;mS$ms(o!xch2P=Af9ujWyI5UHSTQVrs&YA{J?!{ke-Z*DD@xluS& z4oHyHl%%UL&FqfrVD8A%sEG$cNt%aJi1#~_{sn`^W9W9nwCENAzf21i520*$3^i&L zpK=+$l-HKx^TokiNzy)%3SEj>AvK#%3IiD{N>9E_hDnD|)@|FN!r<7xJg1a!=da_P zN2lpPWL4Hv@ft?dsqk&91u})J<>(y@b8>xfs^Q_gW>1#5rQ_oFRU}@Iq&K**IQpk> z%@B#H8Ms;miF)CjOq4fL(sRmQb^Bm8YWqxD%5?6SvMuNhk zJv^s_g&i|DHR=X8YGsU3JBeJzuBA1YAC3p945eds8Ug2Jm^{&~kO|1F79SPV5GHvx zVInOYG}oIo?d9%4qqb4ss@FE>e}IWJ+t}YbtRK|(cI&&_^99s+Y5(Oe|522#KzYBm zvA4TXe?ebMh}6>u&Amp0eoaU-Fj?E*-`k&`qz{|5?fvylR6A7-->rLaZ?FUjK*j3g zSFoV0Wbaa{VH$qJjKE*{Hu~S$iscAI!oS7;JrkrZ!U_B!pe%~kGxfUyT+8ZBky*M8 z(uwH>p>Amr*i(Vv1xJMC9k}i~9Zm0au#WheVRk&NjT;~P=+2S|`=YcAHzVL2xw4e5 zybrhIl{`<|I$}B|ljetQw19S}x*#f>`iCi45SC{OfbXJv|G3He zSPKQJ7f4rMH|<#01?uB@UB8A!V(@LmE_k|>L1d|lZbOAGu zA(`OW%hjkAxXv}44)u0oeh61w)*m1vL@WpCV1lP5X^8X*&U{hQCop83)Q8mN zs`qZ)f#o~}lDZXXBdUsd>mvze$|LiKwP;Q|l(eb{}r?T@FTe8I<^G+-4I0eB7q_q~442 zJ=%>dr>voqrwu5Nf3JfamyqLCi&Si^;rGSG+gGE?m8VtbC;nE%T)2y6lnvd zL`9HA$5qLbBea7+4w0k-=$F7lQTi3$X&5-Zfm5iYr~PT(9q0@gBeA&HYAbH&D3|8e z)-Iwf+tEd>Tc(+NKbQ<ahbBCziFT#MnEJduI77c9W_CMVj>ZY+nQTE#dEdfaY$$S zn&$wbeN!^Z(V;{J!vR{dWcUd^~8!PLsM9gl!I|8QkW- zqoyZTntZkq3owox>r7pN#RPy-4^x#U6u>sy)lH8>7O&C;^)HifC6N$-!kdk#eMsPx zQ}rzECjiTd=vitaV*hzWSE)-XuRY3}O~SrmvWnEm?Bf(cqv>Kg8yaqSh$WQQKCIyx zr2j;6#`9qA)eM~!Cm%`wML+RB(Elee6%cy(IPM~kE|2jjg;0|Ogi(7ig~XUyKF-8Q zJXilfI-(1C!G&wdT}GYZCX|0c*uzz)?X2}?fl7oHG?6Cx^60CVo#q|;1;2WWP|1Yhs~J~KO7;2bj>d-k49Ln7VkX?%i{T|UW| z%P@~`P-Z{-Wr}}UgmTX#{!WP?dchfWGa@?Ae8+yp+RxdkFMSCU*hRz)PaP91&t4y^ z|Bl^59E^F9dj_ZV&tMKs#-l`&ikS7~A_&hP`G;b_QMbE}a9ZR?O^@F1XwvTsuU74M z>&Gzkv@vR~G+^(~E`-8aQT4Bd2w8^=y)rbIA@IZ|s%`Q6kD8$Z0Wh||n$y)RvnysM z0)X)@<}+V38Z<}G1Pk%K&~;X@t>lyNf^;8dJ!UZ)bMV!orFqY4^#RQBbV-Idlm}Q0 z_&WklUa6f-P`;?1#$Bo4y2)%+`VriS$7R_0Vgg_j%?a?p^sFR3f-j8hn}?R|9nVW9 zJh-IZ8Kl{qXyDxO5fhq; zt?0d(9-Pw^Eqrl)S5$s{>1_)x*{H6oz%+e04W@J-ja-aWike^a5iVBi?)Y MO7SXt24?{O1-Gpj*8l(j literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php new file mode 100644 index 000000000000..f64c0fcbe2b9 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php @@ -0,0 +1,173 @@ +internalAddGeneratedFile( + ' +¡D +1google/cloud/gkemulticloud/v1/azure_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/gkemulticloud/v1/azure_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ý +CreateAzureClusterRequestA +parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureClusterG + azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA +azure_cluster_id ( BàA + validate_only ("± +UpdateAzureClusterRequestG + azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA + validate_only (4 + update_mask ( 2.google.protobuf.FieldMaskBàA"Y +GetAzureClusterRequest? +name ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster"„ +ListAzureClustersRequestA +parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureCluster + page_size ( + +page_token ( "y +ListAzureClustersResponseC +azure_clusters ( 2+.google.cloud.gkemulticloud.v1.AzureCluster +next_page_token ( "˜ +DeleteAzureClusterRequest? +name ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster + allow_missing ( + validate_only ( +etag ( "ä +CreateAzureNodePoolRequestB +parent ( B2àAúA,*gkemulticloud.googleapis.com/AzureNodePoolJ +azure_node_pool ( 2,.google.cloud.gkemulticloud.v1.AzureNodePoolBàA +azure_node_pool_id ( BàA + validate_only ("µ +UpdateAzureNodePoolRequestJ +azure_node_pool ( 2,.google.cloud.gkemulticloud.v1.AzureNodePoolBàA + validate_only (4 + update_mask ( 2.google.protobuf.FieldMaskBàA"[ +GetAzureNodePoolRequest@ +name ( B2àAúA, +*gkemulticloud.googleapis.com/AzureNodePool"† +ListAzureNodePoolsRequestB +parent ( B2àAúA,*gkemulticloud.googleapis.com/AzureNodePool + page_size ( + +page_token ( "} +ListAzureNodePoolsResponseF +azure_node_pools ( 2,.google.cloud.gkemulticloud.v1.AzureNodePool +next_page_token ( "š +DeleteAzureNodePoolRequest@ +name ( B2àAúA, +*gkemulticloud.googleapis.com/AzureNodePool + validate_only ( + allow_missing ( +etag ( "g +GetAzureOpenIdConfigRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster"f +GetAzureJsonWebKeysRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster"c +GetAzureServerConfigRequestD +name ( B6àAúA0 +.gkemulticloud.googleapis.com/AzureServerConfig"Ø +CreateAzureClientRequest@ +parent ( B0àAúA*(gkemulticloud.googleapis.com/AzureClientE + azure_client ( 2*.google.cloud.gkemulticloud.v1.AzureClientBàA +azure_client_id ( BàA + validate_only ("W +GetAzureClientRequest> +name ( B0àAúA* +(gkemulticloud.googleapis.com/AzureClient"‚ +ListAzureClientsRequest@ +parent ( B0àAúA*(gkemulticloud.googleapis.com/AzureClient + page_size ( + +page_token ( "v +ListAzureClientsResponseA + azure_clients ( 2*.google.cloud.gkemulticloud.v1.AzureClient +next_page_token ( "ˆ +DeleteAzureClientRequest> +name ( B0àAúA* +(gkemulticloud.googleapis.com/AzureClient + allow_missing ( + validate_only ("k +GenerateAzureAccessTokenRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster"w + GenerateAzureAccessTokenResponse + access_token ( BàA8 +expiration_time ( 2.google.protobuf.TimestampBàA"Ü +%GenerateAzureClusterAgentTokenRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster + subject_token ( BàA +subject_token_type ( BàA +version ( BàA + node_pool_id ( BàA + +grant_type ( BàA +audience ( BàA +scope ( BàA! +requested_token_type ( BàA +options + ( BàA"f +&GenerateAzureClusterAgentTokenResponse + access_token (  + +expires_in ( + +token_type ( 2Ì# + AzureClustersý +CreateAzureClient7.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.google.longrunning.Operation"‚Óä“@"0/v1/{parent=projects/*/locations/*}/azureClients: azure_clientÚA#parent,azure_client,azure_client_idÊA + AzureClientOperationMetadata³ +GetAzureClient4.google.cloud.gkemulticloud.v1.GetAzureClientRequest*.google.cloud.gkemulticloud.v1.AzureClient"?‚Óä“20/v1/{name=projects/*/locations/*/azureClients/*}ÚAnameÆ +ListAzureClients6.google.cloud.gkemulticloud.v1.ListAzureClientsRequest7.google.cloud.gkemulticloud.v1.ListAzureClientsResponse"A‚Óä“20/v1/{parent=projects/*/locations/*}/azureClientsÚAparentÙ +DeleteAzureClient7.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.google.longrunning.Operation"l‚Óä“2*0/v1/{name=projects/*/locations/*/azureClients/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata„ +CreateAzureCluster8.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.google.longrunning.Operation"”‚Óä“B"1/v1/{parent=projects/*/locations/*}/azureClusters: azure_clusterÚA%parent,azure_cluster,azure_cluster_idÊA! + AzureClusterOperationMetadata† +UpdateAzureCluster8.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.google.longrunning.Operation"–‚Óä“P2?/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}: azure_clusterÚAazure_cluster,update_maskÊA! + AzureClusterOperationMetadata· +GetAzureCluster5.google.cloud.gkemulticloud.v1.GetAzureClusterRequest+.google.cloud.gkemulticloud.v1.AzureCluster"@‚Óä“31/v1/{name=projects/*/locations/*/azureClusters/*}ÚAnameÊ +ListAzureClusters7.google.cloud.gkemulticloud.v1.ListAzureClustersRequest8.google.cloud.gkemulticloud.v1.ListAzureClustersResponse"B‚Óä“31/v1/{parent=projects/*/locations/*}/azureClustersÚAparentÜ +DeleteAzureCluster8.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/azureClusters/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata“ +GenerateAzureClusterAgentTokenD.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequestE.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenResponse"d‚Óä“^"Y/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken:*ø +GenerateAzureAccessToken>.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest?.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse"[‚Óä“US/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessTokenž +CreateAzureNodePool9.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.google.longrunning.Operation"¬‚Óä“U"B/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools:azure_node_poolÚA)parent,azure_node_pool,azure_node_pool_idÊA" + AzureNodePoolOperationMetadata  +UpdateAzureNodePool9.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.google.longrunning.Operation"®‚Óä“e2R/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}:azure_node_poolÚAazure_node_pool,update_maskÊA" + AzureNodePoolOperationMetadataË +GetAzureNodePool6.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest,.google.cloud.gkemulticloud.v1.AzureNodePool"Q‚Óä“DB/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ÚAnameÞ +ListAzureNodePools8.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest9.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse"S‚Óä“DB/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePoolsÚAparentï +DeleteAzureNodePool9.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.google.longrunning.Operation"~‚Óä“D*B/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataù +GetAzureOpenIdConfig:.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest0.google.cloud.gkemulticloud.v1.AzureOpenIdConfig"s‚Óä“][/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configurationÚA azure_clusterÚ +GetAzureJsonWebKeys9.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest/.google.cloud.gkemulticloud.v1.AzureJsonWebKeys"W‚Óä“A?/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwksÚA azure_clusterÈ +GetAzureServerConfig:.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest0.google.cloud.gkemulticloud.v1.AzureServerConfig"B‚Óä“53/v1/{name=projects/*/locations/*/azureServerConfig}ÚAnamePÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBä +!com.google.cloud.gkemulticloud.v1BAzureServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php new file mode 100644 index 0000000000000000000000000000000000000000..9162c8f2951509859a2ceaf20a01cc1b8662003b GIT binary patch literal 2515 zcmbVO-Ez}L6s~Q^&j|^(fZ))fEQT3Er*$TQa$!mt|H!VXZFyoRG>oUJENz@^WUacA z457nJpQI1a$LM7*d)3R{b*4|zBdw(T5K0GM>Fl2K?K$81)_cBu>K?dohqS0eh2c|+ zjE{(aK#423&rNQVaj?Hn1u^;5Wi}OMLK+(BX+xqm+QZuz>hVCBv_dAFPi(qj+B~o} zCWmwy*gliiY;yzSr`*v6mF`|SIsm{irqpu{laf}y)}_8-8NM-UMOdSHh&5`R#2W2x zJ_ayt!}CZz!rV?E;U^&YbAz$XOycV6M+aA6+Yz3H4K6! z@v$Ks+b8QX$4cd`B%csp1oY(Tgb3;f!g(C!9Rj>bzeeX!S9RH_$*67B=z%d~TvRH@ zRULzz7n&9}WY`S(ZIK_*}CoRq;pRbDZ$>&jVA^Jo}Q_PBsp;7t{R-bcmXmi7ATh#HHe^lqrKAR{C z0Q00P-SsmYfxZuu#VNu&=4}q(gP@TjaPkcc?j$I!oV&lpFm-1 zyg~%a(_K8k;TDZf$klRxRkNj^vry1*11|=5lDnonge6l@y!(1cT;#vBb)y`Up0HX@ z#SmiUlucNmjwM4v7XL@c6`1o4ftNzoAaQQMa(D{@Pq*;$Gg}fb_txMN6@rUoD{6$? zD!_#q6=T^2xpW6s1^qEV#ZpT*4ZOa#9aS22Z6R_h{gHvi9?~+52+N}+Xe^0vKa1VD zI5X^k$_~i22Fy|X4>V=oD_a{0H|GnooZ^?&C@exL?ZKQhl~qvGW>c*X^_||Juh!em zw%W*lq+Eujo~94#U#pFsj+)Pej{R-5sc!2h*R#qB04}KCs`Z_rn$MLU!NsOcsjpmx zdFPsu{JfxhyU~3LB;B3q}NyvU%aR0 z6eo_BfTiCuuzLQM@&XFfF~&BM=mxmtpa_w*5^( znJD3yGI<{!y{C$=KcLgpoBR@9b-(w`Z)Qe%!Gj;euwfC;{i6p!Ry zrlF1_OP?nH11nqA_at==SXoVxx(HOFuyT4uxdk7qyVcH4b=cN=dRJ?xXOw*j78>nA zwbntMXOz1@`rF#G@B$3ly;esZVpL!2wCj7i+G}dtbv2)@{hfi^sEq&4w{{i#jB`ag z10b6|?`K}L;=38m5oN^LnD8@0iQzJwOHMr}?)dQ;``7Hvmc)o=kuuIA-Egjv*6!x- z$^IxFR>EoJ*kgp_%0F2mAu5$9s!}=SQmO22j^|KBK7Vj8eKJ3j1Hg%S;hnQWgoogle.cloud.gkemulticloud.v1.AttachedCluster + */ +class AttachedCluster extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. OpenID Connect (OIDC) configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $oidc_config = null; + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $platform_version = ''; + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks", "generic"]. + * + * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $distribution = ''; + /** + * Output only. The region where this cluster runs. + * For EKS clusters, this is a AWS region. For AKS clusters, + * this is an Azure region. + * + * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_region = ''; + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet = null; + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The time at which this cluster was registered. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 11; + */ + protected $etag = ''; + /** + * Output only. The Kubernetes version of the cluster. + * + * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kubernetes_version = ''; + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_identity_config = null; + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $logging_config = null; + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Optional. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authorization = null; + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $monitoring_config = null; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $binary_authorization = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type string $description + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig $oidc_config + * Required. OpenID Connect (OIDC) configuration for the cluster. + * @type string $platform_version + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @type string $distribution + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks", "generic"]. + * @type string $cluster_region + * Output only. The region where this cluster runs. + * For EKS clusters, this is a AWS region. For AKS clusters, + * this is an Azure region. + * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet + * Required. Fleet configuration. + * @type int $state + * Output only. The current state of the cluster. + * @type string $uid + * Output only. A globally unique identifier for the cluster. + * @type bool $reconciling + * Output only. If set, there are currently changes in flight to the cluster. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this cluster was registered. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this cluster was last updated. + * @type string $etag + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type string $kubernetes_version + * Output only. The Kubernetes version of the cluster. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config + * Output only. Workload Identity settings. + * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config + * Optional. Logging configuration for this cluster. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterError>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. A set of errors found in the cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization $authorization + * Optional. Configuration related to the cluster RBAC settings. + * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config + * Optional. Monitoring configuration for this cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization + * Optional. Binary Authorization configuration for this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. OpenID Connect (OIDC) configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig|null + */ + public function getOidcConfig() + { + return $this->oidc_config; + } + + public function hasOidcConfig() + { + return isset($this->oidc_config); + } + + public function clearOidcConfig() + { + unset($this->oidc_config); + } + + /** + * Required. OpenID Connect (OIDC) configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig $var + * @return $this + */ + public function setOidcConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig::class); + $this->oidc_config = $var; + + return $this; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlatformVersion() + { + return $this->platform_version; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlatformVersion($var) + { + GPBUtil::checkString($var, True); + $this->platform_version = $var; + + return $this; + } + + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks", "generic"]. + * + * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDistribution() + { + return $this->distribution; + } + + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks", "generic"]. + * + * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDistribution($var) + { + GPBUtil::checkString($var, True); + $this->distribution = $var; + + return $this; + } + + /** + * Output only. The region where this cluster runs. + * For EKS clusters, this is a AWS region. For AKS clusters, + * this is an Azure region. + * + * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getClusterRegion() + { + return $this->cluster_region; + } + + /** + * Output only. The region where this cluster runs. + * For EKS clusters, this is a AWS region. For AKS clusters, + * this is an Azure region. + * + * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClusterRegion($var) + { + GPBUtil::checkString($var, True); + $this->cluster_region = $var; + + return $this; + } + + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null + */ + public function getFleet() + { + return $this->fleet; + } + + public function hasFleet() + { + return isset($this->fleet); + } + + public function clearFleet() + { + unset($this->fleet); + } + + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); + $this->fleet = $var; + + return $this; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The time at which this cluster was registered. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this cluster was registered. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 11; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 11; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The Kubernetes version of the cluster. + * + * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKubernetesVersion() + { + return $this->kubernetes_version; + } + + /** + * Output only. The Kubernetes version of the cluster. + * + * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKubernetesVersion($var) + { + GPBUtil::checkString($var, True); + $this->kubernetes_version = $var; + + return $this; + } + + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null + */ + public function getWorkloadIdentityConfig() + { + return $this->workload_identity_config; + } + + public function hasWorkloadIdentityConfig() + { + return isset($this->workload_identity_config); + } + + public function clearWorkloadIdentityConfig() + { + unset($this->workload_identity_config); + } + + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var + * @return $this + */ + public function setWorkloadIdentityConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); + $this->workload_identity_config = $var; + + return $this; + } + + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null + */ + public function getLoggingConfig() + { + return $this->logging_config; + } + + public function hasLoggingConfig() + { + return isset($this->logging_config); + } + + public function clearLoggingConfig() + { + unset($this->logging_config); + } + + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var + * @return $this + */ + public function setLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); + $this->logging_config = $var; + + return $this; + } + + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterError::class); + $this->errors = $arr; + + return $this; + } + + /** + * Optional. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization|null + */ + public function getAuthorization() + { + return $this->authorization; + } + + public function hasAuthorization() + { + return isset($this->authorization); + } + + public function clearAuthorization() + { + unset($this->authorization); + } + + /** + * Optional. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization $var + * @return $this + */ + public function setAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization::class); + $this->authorization = $var; + + return $this; + } + + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null + */ + public function getMonitoringConfig() + { + return $this->monitoring_config; + } + + public function hasMonitoringConfig() + { + return isset($this->monitoring_config); + } + + public function clearMonitoringConfig() + { + unset($this->monitoring_config); + } + + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var + * @return $this + */ + public function setMonitoringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); + $this->monitoring_config = $var; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php new file mode 100644 index 000000000000..51a928e34a8a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php @@ -0,0 +1,96 @@ +google.cloud.gkemulticloud.v1.AttachedCluster.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the cluster is being registered. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the cluster has been register and is fully + * usable. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The RECONCILING state indicates that some work is actively being done on + * the cluster, such as upgrading software components. + * + * Generated from protobuf enum RECONCILING = 3; + */ + const RECONCILING = 3; + /** + * The STOPPING state indicates the cluster is being de-registered. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The ERROR state indicates the cluster is in a broken unrecoverable + * state. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * The DEGRADED state indicates the cluster requires user action to + * restore full functionality. + * + * Generated from protobuf enum DEGRADED = 6; + */ + const DEGRADED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::RECONCILING => 'RECONCILING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + self::DEGRADED => 'DEGRADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster_State::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php new file mode 100644 index 000000000000..7e2ea588596e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AttachedClusterError + */ +class AttachedClusterError extends \Google\Protobuf\Internal\Message +{ + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Human-friendly description of the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php new file mode 100644 index 000000000000..74ec3910d5e6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AttachedClusterGroup + */ +class AttachedClusterGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The name of the group, e.g. `my-group@domain.com`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php new file mode 100644 index 000000000000..f020f59ff48b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AttachedClusterUser + */ +class AttachedClusterUser extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php new file mode 100644 index 000000000000..ee4306f352a8 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php @@ -0,0 +1,133 @@ +google.cloud.gkemulticloud.v1.AttachedClustersAuthorization + */ +class AttachedClustersAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_users; + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_groups; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminUsers() + { + return $this->admin_users; + } + + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser::class); + $this->admin_users = $arr; + + return $this; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminGroups() + { + return $this->admin_groups; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup::class); + $this->admin_groups = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php new file mode 100644 index 000000000000..116db53533d8 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php @@ -0,0 +1,129 @@ +google.cloud.gkemulticloud.v1.AttachedOidcConfig + */ +class AttachedOidcConfig extends \Google\Protobuf\Internal\Message +{ + /** + * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. + * + * Generated from protobuf field string issuer_url = 1; + */ + protected $issuer_url = ''; + /** + * Optional. OIDC verification keys in JWKS format (RFC 7517). + * It contains a list of OIDC verification keys that can be used to verify + * OIDC JWTs. + * This field is required for cluster that doesn't have a publicly available + * discovery endpoint. When provided, it will be directly used + * to verify the OIDC JWT asserted by the IDP. + * + * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $jwks = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer_url + * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. + * @type string $jwks + * Optional. OIDC verification keys in JWKS format (RFC 7517). + * It contains a list of OIDC verification keys that can be used to verify + * OIDC JWTs. + * This field is required for cluster that doesn't have a publicly available + * discovery endpoint. When provided, it will be directly used + * to verify the OIDC JWT asserted by the IDP. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. + * + * Generated from protobuf field string issuer_url = 1; + * @return string + */ + public function getIssuerUrl() + { + return $this->issuer_url; + } + + /** + * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. + * + * Generated from protobuf field string issuer_url = 1; + * @param string $var + * @return $this + */ + public function setIssuerUrl($var) + { + GPBUtil::checkString($var, True); + $this->issuer_url = $var; + + return $this; + } + + /** + * Optional. OIDC verification keys in JWKS format (RFC 7517). + * It contains a list of OIDC verification keys that can be used to verify + * OIDC JWTs. + * This field is required for cluster that doesn't have a publicly available + * discovery endpoint. When provided, it will be directly used + * to verify the OIDC JWT asserted by the IDP. + * + * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getJwks() + { + return $this->jwks; + } + + /** + * Optional. OIDC verification keys in JWKS format (RFC 7517). + * It contains a list of OIDC verification keys that can be used to verify + * OIDC JWTs. + * This field is required for cluster that doesn't have a publicly available + * discovery endpoint. When provided, it will be directly used + * to verify the OIDC JWT asserted by the IDP. + * + * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setJwks($var) + { + GPBUtil::checkString($var, False); + $this->jwks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php new file mode 100644 index 000000000000..a81ade67a335 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo + */ +class AttachedPlatformVersionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Platform version name. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Platform version name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Platform version name. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Platform version name. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php new file mode 100644 index 000000000000..e08ea3aba3b0 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php @@ -0,0 +1,85 @@ +google.cloud.gkemulticloud.v1.AttachedProxyConfig + */ +class AttachedProxyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Kubernetes Secret resource that contains the HTTP(S) proxy + * configuration. The secret must be a JSON encoded proxy configuration + * as described in + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; + */ + protected $kubernetes_secret = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret $kubernetes_secret + * The Kubernetes Secret resource that contains the HTTP(S) proxy + * configuration. The secret must be a JSON encoded proxy configuration + * as described in + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * The Kubernetes Secret resource that contains the HTTP(S) proxy + * configuration. The secret must be a JSON encoded proxy configuration + * as described in + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; + * @return \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret|null + */ + public function getKubernetesSecret() + { + return $this->kubernetes_secret; + } + + public function hasKubernetesSecret() + { + return isset($this->kubernetes_secret); + } + + public function clearKubernetesSecret() + { + unset($this->kubernetes_secret); + } + + /** + * The Kubernetes Secret resource that contains the HTTP(S) proxy + * configuration. The secret must be a JSON encoded proxy configuration + * as described in + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; + * @param \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret $var + * @return $this + */ + public function setKubernetesSecret($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret::class); + $this->kubernetes_secret = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php new file mode 100644 index 000000000000..3257fd12cab9 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php @@ -0,0 +1,102 @@ +google.cloud.gkemulticloud.v1.AttachedServerConfig + */ +class AttachedServerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the config. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * List of valid platform versions. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; + */ + private $valid_versions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the config. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions + * List of valid platform versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the config. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the config. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * List of valid platform versions. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidVersions() + { + return $this->valid_versions; + } + + /** + * List of valid platform versions. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo::class); + $this->valid_versions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php new file mode 100644 index 000000000000..25f25a6866ee --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php @@ -0,0 +1,133 @@ +google.cloud.gkemulticloud.v1.AwsAuthorization + */ +class AwsAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_users; + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_groups; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminUsers() + { + return $this->admin_users; + } + + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterUser::class); + $this->admin_users = $arr; + + return $this; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminGroups() + { + return $this->admin_groups; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup::class); + $this->admin_groups = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php new file mode 100644 index 000000000000..dddb1fd5dc97 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php @@ -0,0 +1,118 @@ +google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + */ +class AwsAutoscalingGroupMetricsCollection extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The frequency at which EC2 Auto Scaling sends aggregated data to + * AWS CloudWatch. The only valid value is "1Minute". + * + * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $granularity = ''; + /** + * Optional. The metrics to enable. For a list of valid metrics, see + * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. + * If you specify Granularity and don't specify any metrics, all metrics are + * enabled. + * + * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $metrics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $granularity + * Required. The frequency at which EC2 Auto Scaling sends aggregated data to + * AWS CloudWatch. The only valid value is "1Minute". + * @type array|\Google\Protobuf\Internal\RepeatedField $metrics + * Optional. The metrics to enable. For a list of valid metrics, see + * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. + * If you specify Granularity and don't specify any metrics, all metrics are + * enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The frequency at which EC2 Auto Scaling sends aggregated data to + * AWS CloudWatch. The only valid value is "1Minute". + * + * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGranularity() + { + return $this->granularity; + } + + /** + * Required. The frequency at which EC2 Auto Scaling sends aggregated data to + * AWS CloudWatch. The only valid value is "1Minute". + * + * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGranularity($var) + { + GPBUtil::checkString($var, True); + $this->granularity = $var; + + return $this; + } + + /** + * Optional. The metrics to enable. For a list of valid metrics, see + * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. + * If you specify Granularity and don't specify any metrics, all metrics are + * enabled. + * + * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * Optional. The metrics to enable. For a list of valid metrics, see + * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. + * If you specify Granularity and don't specify any metrics, all metrics are + * enabled. + * + * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->metrics = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php new file mode 100644 index 000000000000..68baa291c95b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php @@ -0,0 +1,923 @@ +google.cloud.gkemulticloud.v1.AwsCluster + */ +class AwsCluster extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. Cluster-wide networking configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $networking = null; + /** + * Required. The AWS region where the cluster runs. + * Each Google Cloud region supports a subset of nearby AWS regions. + * You can call + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + * to list all supported AWS regions within a given Google Cloud region. + * + * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_region = ''; + /** + * Required. Configuration related to the cluster control plane. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $control_plane = null; + /** + * Required. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization = null; + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The endpoint of the cluster's API server. + * + * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $endpoint = ''; + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The time at which this cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 13; + */ + protected $etag = ''; + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_identity_config = null; + /** + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * + * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_ca_certificate = ''; + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet = null; + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $logging_config = null; + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $monitoring_config = null; + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $binary_authorization = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type string $description + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking $networking + * Required. Cluster-wide networking configuration. + * @type string $aws_region + * Required. The AWS region where the cluster runs. + * Each Google Cloud region supports a subset of nearby AWS regions. + * You can call + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + * to list all supported AWS regions within a given Google Cloud region. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane $control_plane + * Required. Configuration related to the cluster control plane. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization $authorization + * Required. Configuration related to the cluster RBAC settings. + * @type int $state + * Output only. The current state of the cluster. + * @type string $endpoint + * Output only. The endpoint of the cluster's API server. + * @type string $uid + * Output only. A globally unique identifier for the cluster. + * @type bool $reconciling + * Output only. If set, there are currently changes in flight to the cluster. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this cluster was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this cluster was last updated. + * @type string $etag + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config + * Output only. Workload Identity settings. + * @type string $cluster_ca_certificate + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet + * Required. Fleet configuration. + * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config + * Optional. Logging configuration for this cluster. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterError>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. A set of errors found in the cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config + * Optional. Monitoring configuration for this cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization + * Optional. Binary Authorization configuration for this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Cluster-wide networking configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking|null + */ + public function getNetworking() + { + return $this->networking; + } + + public function hasNetworking() + { + return isset($this->networking); + } + + public function clearNetworking() + { + unset($this->networking); + } + + /** + * Required. Cluster-wide networking configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking $var + * @return $this + */ + public function setNetworking($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking::class); + $this->networking = $var; + + return $this; + } + + /** + * Required. The AWS region where the cluster runs. + * Each Google Cloud region supports a subset of nearby AWS regions. + * You can call + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + * to list all supported AWS regions within a given Google Cloud region. + * + * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAwsRegion() + { + return $this->aws_region; + } + + /** + * Required. The AWS region where the cluster runs. + * Each Google Cloud region supports a subset of nearby AWS regions. + * You can call + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + * to list all supported AWS regions within a given Google Cloud region. + * + * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAwsRegion($var) + { + GPBUtil::checkString($var, True); + $this->aws_region = $var; + + return $this; + } + + /** + * Required. Configuration related to the cluster control plane. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane|null + */ + public function getControlPlane() + { + return $this->control_plane; + } + + public function hasControlPlane() + { + return isset($this->control_plane); + } + + public function clearControlPlane() + { + unset($this->control_plane); + } + + /** + * Required. Configuration related to the cluster control plane. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane $var + * @return $this + */ + public function setControlPlane($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane::class); + $this->control_plane = $var; + + return $this; + } + + /** + * Required. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization|null + */ + public function getAuthorization() + { + return $this->authorization; + } + + public function hasAuthorization() + { + return isset($this->authorization); + } + + public function clearAuthorization() + { + unset($this->authorization); + } + + /** + * Required. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization $var + * @return $this + */ + public function setAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization::class); + $this->authorization = $var; + + return $this; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The endpoint of the cluster's API server. + * + * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Output only. The endpoint of the cluster's API server. + * + * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The time at which this cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 13; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 13; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null + */ + public function getWorkloadIdentityConfig() + { + return $this->workload_identity_config; + } + + public function hasWorkloadIdentityConfig() + { + return isset($this->workload_identity_config); + } + + public function clearWorkloadIdentityConfig() + { + unset($this->workload_identity_config); + } + + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var + * @return $this + */ + public function setWorkloadIdentityConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); + $this->workload_identity_config = $var; + + return $this; + } + + /** + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * + * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getClusterCaCertificate() + { + return $this->cluster_ca_certificate; + } + + /** + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * + * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClusterCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->cluster_ca_certificate = $var; + + return $this; + } + + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null + */ + public function getFleet() + { + return $this->fleet; + } + + public function hasFleet() + { + return isset($this->fleet); + } + + public function clearFleet() + { + unset($this->fleet); + } + + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); + $this->fleet = $var; + + return $this; + } + + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null + */ + public function getLoggingConfig() + { + return $this->logging_config; + } + + public function hasLoggingConfig() + { + return isset($this->logging_config); + } + + public function clearLoggingConfig() + { + unset($this->logging_config); + } + + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var + * @return $this + */ + public function setLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); + $this->logging_config = $var; + + return $this; + } + + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterError::class); + $this->errors = $arr; + + return $this; + } + + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null + */ + public function getMonitoringConfig() + { + return $this->monitoring_config; + } + + public function hasMonitoringConfig() + { + return isset($this->monitoring_config); + } + + public function clearMonitoringConfig() + { + unset($this->monitoring_config); + } + + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var + * @return $this + */ + public function setMonitoringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); + $this->monitoring_config = $var; + + return $this; + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php new file mode 100644 index 000000000000..59e416b25a7b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php @@ -0,0 +1,96 @@ +google.cloud.gkemulticloud.v1.AwsCluster.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the cluster is being created. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the cluster has been created and is fully + * usable. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The RECONCILING state indicates that some work is actively being done on + * the cluster, such as upgrading the control plane replicas. + * + * Generated from protobuf enum RECONCILING = 3; + */ + const RECONCILING = 3; + /** + * The STOPPING state indicates the cluster is being deleted. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The ERROR state indicates the cluster is in a broken unrecoverable + * state. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * The DEGRADED state indicates the cluster requires user action to + * restore full functionality. + * + * Generated from protobuf enum DEGRADED = 6; + */ + const DEGRADED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::RECONCILING => 'RECONCILING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + self::DEGRADED => 'DEGRADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AwsCluster_State::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php new file mode 100644 index 000000000000..f40a291a78f8 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsClusterError + */ +class AwsClusterError extends \Google\Protobuf\Internal\Message +{ + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Human-friendly description of the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php new file mode 100644 index 000000000000..6c954b94c1b2 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsClusterGroup + */ +class AwsClusterGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The name of the group, e.g. `my-group@domain.com`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php new file mode 100644 index 000000000000..9301c3f5e52d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php @@ -0,0 +1,211 @@ +google.cloud.gkemulticloud.v1.AwsClusterNetworking + */ +class AwsClusterNetworking extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The VPC associated with the cluster. All component clusters + * (i.e. control plane and node pools) run on a single VPC. + * This field cannot be changed after creation. + * + * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vpc_id = ''; + /** + * Required. All pods in the cluster are assigned an IPv4 address from these + * ranges. Only a single range is supported. This field cannot be changed + * after creation. + * + * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $pod_address_cidr_blocks; + /** + * Required. All services in the cluster are assigned an IPv4 address from + * these ranges. Only a single range is supported. This field cannot be + * changed after creation. + * + * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $service_address_cidr_blocks; + /** + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * + * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $per_node_pool_sg_rules_disabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vpc_id + * Required. The VPC associated with the cluster. All component clusters + * (i.e. control plane and node pools) run on a single VPC. + * This field cannot be changed after creation. + * @type array|\Google\Protobuf\Internal\RepeatedField $pod_address_cidr_blocks + * Required. All pods in the cluster are assigned an IPv4 address from these + * ranges. Only a single range is supported. This field cannot be changed + * after creation. + * @type array|\Google\Protobuf\Internal\RepeatedField $service_address_cidr_blocks + * Required. All services in the cluster are assigned an IPv4 address from + * these ranges. Only a single range is supported. This field cannot be + * changed after creation. + * @type bool $per_node_pool_sg_rules_disabled + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The VPC associated with the cluster. All component clusters + * (i.e. control plane and node pools) run on a single VPC. + * This field cannot be changed after creation. + * + * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVpcId() + { + return $this->vpc_id; + } + + /** + * Required. The VPC associated with the cluster. All component clusters + * (i.e. control plane and node pools) run on a single VPC. + * This field cannot be changed after creation. + * + * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVpcId($var) + { + GPBUtil::checkString($var, True); + $this->vpc_id = $var; + + return $this; + } + + /** + * Required. All pods in the cluster are assigned an IPv4 address from these + * ranges. Only a single range is supported. This field cannot be changed + * after creation. + * + * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPodAddressCidrBlocks() + { + return $this->pod_address_cidr_blocks; + } + + /** + * Required. All pods in the cluster are assigned an IPv4 address from these + * ranges. Only a single range is supported. This field cannot be changed + * after creation. + * + * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPodAddressCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->pod_address_cidr_blocks = $arr; + + return $this; + } + + /** + * Required. All services in the cluster are assigned an IPv4 address from + * these ranges. Only a single range is supported. This field cannot be + * changed after creation. + * + * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceAddressCidrBlocks() + { + return $this->service_address_cidr_blocks; + } + + /** + * Required. All services in the cluster are assigned an IPv4 address from + * these ranges. Only a single range is supported. This field cannot be + * changed after creation. + * + * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceAddressCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_address_cidr_blocks = $arr; + + return $this; + } + + /** + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * + * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getPerNodePoolSgRulesDisabled() + { + return $this->per_node_pool_sg_rules_disabled; + } + + /** + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * + * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setPerNodePoolSgRulesDisabled($var) + { + GPBUtil::checkBool($var); + $this->per_node_pool_sg_rules_disabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php new file mode 100644 index 000000000000..005bd094c801 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsClusterUser + */ +class AwsClusterUser extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php new file mode 100644 index 000000000000..ed4be8aef12a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsConfigEncryption + */ +class AwsConfigEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ARN of the AWS KMS key used to encrypt user data. + * + * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_key_arn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_arn + * Required. The ARN of the AWS KMS key used to encrypt user data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ARN of the AWS KMS key used to encrypt user data. + * + * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsKeyArn() + { + return $this->kms_key_arn; + } + + /** + * Required. The ARN of the AWS KMS key used to encrypt user data. + * + * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsKeyArn($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_arn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php new file mode 100644 index 000000000000..826ee8af1a67 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php @@ -0,0 +1,693 @@ +google.cloud.gkemulticloud.v1.AwsControlPlane + */ +class AwsControlPlane extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Optional. The AWS instance type. + * When unspecified, it uses a default based on the cluster's version. + * + * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $instance_type = ''; + /** + * Optional. SSH configuration for how to access the underlying control plane + * machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ssh_config = null; + /** + * Required. The list of subnets where control plane replicas will run. + * A replica will be provisioned on each subnet and up to three values + * can be provided. + * Each subnet must be in a different AWS Availability Zone (AZ). + * + * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $subnet_ids; + /** + * Optional. The IDs of additional security groups to add to control plane + * replicas. The Anthos Multi-Cloud API will automatically create and manage + * security groups with the minimum rules needed for a functioning cluster. + * + * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $security_group_ids; + /** + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. + * + * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $iam_instance_profile = ''; + /** + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $root_volume = null; + /** + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 8 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $main_volume = null; + /** + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_encryption = null; + /** + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Required. Authentication configuration for management of AWS resources. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_services_authentication = null; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + /** + * Required. Config encryption for user data. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config_encryption = null; + /** + * Optional. The placement to use on control plane instances. + * When unspecified, the VPC's default tenancy will be used. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $instance_placement = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * @type string $instance_type + * Optional. The AWS instance type. + * When unspecified, it uses a default based on the cluster's version. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config + * Optional. SSH configuration for how to access the underlying control plane + * machines. + * @type array|\Google\Protobuf\Internal\RepeatedField $subnet_ids + * Required. The list of subnets where control plane replicas will run. + * A replica will be provisioned on each subnet and up to three values + * can be provided. + * Each subnet must be in a different AWS Availability Zone (AZ). + * @type array|\Google\Protobuf\Internal\RepeatedField $security_group_ids + * Optional. The IDs of additional security groups to add to control plane + * replicas. The Anthos Multi-Cloud API will automatically create and manage + * security groups with the minimum rules needed for a functioning cluster. + * @type string $iam_instance_profile + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $main_volume + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 8 GiB with the GP2 volume type. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption $database_encryption + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication $aws_services_authentication + * Required. Authentication configuration for management of AWS resources. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $config_encryption + * Required. Config encryption for user data. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $instance_placement + * Optional. The placement to use on control plane instances. + * When unspecified, the VPC's default tenancy will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. The AWS instance type. + * When unspecified, it uses a default based on the cluster's version. + * + * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * Optional. The AWS instance type. + * When unspecified, it uses a default based on the cluster's version. + * + * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkString($var, True); + $this->instance_type = $var; + + return $this; + } + + /** + * Optional. SSH configuration for how to access the underlying control plane + * machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig|null + */ + public function getSshConfig() + { + return $this->ssh_config; + } + + public function hasSshConfig() + { + return isset($this->ssh_config); + } + + public function clearSshConfig() + { + unset($this->ssh_config); + } + + /** + * Optional. SSH configuration for how to access the underlying control plane + * machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $var + * @return $this + */ + public function setSshConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig::class); + $this->ssh_config = $var; + + return $this; + } + + /** + * Required. The list of subnets where control plane replicas will run. + * A replica will be provisioned on each subnet and up to three values + * can be provided. + * Each subnet must be in a different AWS Availability Zone (AZ). + * + * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubnetIds() + { + return $this->subnet_ids; + } + + /** + * Required. The list of subnets where control plane replicas will run. + * A replica will be provisioned on each subnet and up to three values + * can be provided. + * Each subnet must be in a different AWS Availability Zone (AZ). + * + * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubnetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subnet_ids = $arr; + + return $this; + } + + /** + * Optional. The IDs of additional security groups to add to control plane + * replicas. The Anthos Multi-Cloud API will automatically create and manage + * security groups with the minimum rules needed for a functioning cluster. + * + * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityGroupIds() + { + return $this->security_group_ids; + } + + /** + * Optional. The IDs of additional security groups to add to control plane + * replicas. The Anthos Multi-Cloud API will automatically create and manage + * security groups with the minimum rules needed for a functioning cluster. + * + * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityGroupIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->security_group_ids = $arr; + + return $this; + } + + /** + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. + * + * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getIamInstanceProfile() + { + return $this->iam_instance_profile; + } + + /** + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. + * + * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setIamInstanceProfile($var) + { + GPBUtil::checkString($var, True); + $this->iam_instance_profile = $var; + + return $this; + } + + /** + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null + */ + public function getRootVolume() + { + return $this->root_volume; + } + + public function hasRootVolume() + { + return isset($this->root_volume); + } + + public function clearRootVolume() + { + unset($this->root_volume); + } + + /** + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var + * @return $this + */ + public function setRootVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); + $this->root_volume = $var; + + return $this; + } + + /** + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 8 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null + */ + public function getMainVolume() + { + return $this->main_volume; + } + + public function hasMainVolume() + { + return isset($this->main_volume); + } + + public function clearMainVolume() + { + unset($this->main_volume); + } + + /** + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * Volumes will be provisioned in the availability zone associated + * with the corresponding subnet. + * When unspecified, it defaults to 8 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var + * @return $this + */ + public function setMainVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); + $this->main_volume = $var; + + return $this; + } + + /** + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption|null + */ + public function getDatabaseEncryption() + { + return $this->database_encryption; + } + + public function hasDatabaseEncryption() + { + return isset($this->database_encryption); + } + + public function clearDatabaseEncryption() + { + unset($this->database_encryption); + } + + /** + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption $var + * @return $this + */ + public function setDatabaseEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption::class); + $this->database_encryption = $var; + + return $this; + } + + /** + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Required. Authentication configuration for management of AWS resources. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication|null + */ + public function getAwsServicesAuthentication() + { + return $this->aws_services_authentication; + } + + public function hasAwsServicesAuthentication() + { + return isset($this->aws_services_authentication); + } + + public function clearAwsServicesAuthentication() + { + unset($this->aws_services_authentication); + } + + /** + * Required. Authentication configuration for management of AWS resources. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication $var + * @return $this + */ + public function setAwsServicesAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication::class); + $this->aws_services_authentication = $var; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + + /** + * Required. Config encryption for user data. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption|null + */ + public function getConfigEncryption() + { + return $this->config_encryption; + } + + public function hasConfigEncryption() + { + return isset($this->config_encryption); + } + + public function clearConfigEncryption() + { + unset($this->config_encryption); + } + + /** + * Required. Config encryption for user data. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $var + * @return $this + */ + public function setConfigEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption::class); + $this->config_encryption = $var; + + return $this; + } + + /** + * Optional. The placement to use on control plane instances. + * When unspecified, the VPC's default tenancy will be used. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement|null + */ + public function getInstancePlacement() + { + return $this->instance_placement; + } + + public function hasInstancePlacement() + { + return isset($this->instance_placement); + } + + public function clearInstancePlacement() + { + unset($this->instance_placement); + } + + /** + * Optional. The placement to use on control plane instances. + * When unspecified, the VPC's default tenancy will be used. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $var + * @return $this + */ + public function setInstancePlacement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement::class); + $this->instance_placement = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php new file mode 100644 index 000000000000..e7e0ce60bd12 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + */ +class AwsDatabaseEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * + * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_key_arn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_arn + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * + * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsKeyArn() + { + return $this->kms_key_arn; + } + + /** + * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + * + * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsKeyArn($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_arn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php new file mode 100644 index 000000000000..e2eccd85ae67 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php @@ -0,0 +1,70 @@ +google.cloud.gkemulticloud.v1.AwsInstancePlacement + */ +class AwsInstancePlacement extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The tenancy for instance. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenancy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $tenancy + * Required. The tenancy for instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The tenancy for instance. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTenancy() + { + return $this->tenancy; + } + + /** + * Required. The tenancy for instance. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTenancy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement\Tenancy::class); + $this->tenancy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php new file mode 100644 index 000000000000..7c147a1fef41 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php @@ -0,0 +1,75 @@ +google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy + */ +class Tenancy +{ + /** + * Not set. + * + * Generated from protobuf enum TENANCY_UNSPECIFIED = 0; + */ + const TENANCY_UNSPECIFIED = 0; + /** + * Use default VPC tenancy. + * + * Generated from protobuf enum DEFAULT = 1; + */ + const PBDEFAULT = 1; + /** + * Run a dedicated instance. + * + * Generated from protobuf enum DEDICATED = 2; + */ + const DEDICATED = 2; + /** + * Launch this instance to a dedicated host. + * + * Generated from protobuf enum HOST = 3; + */ + const HOST = 3; + + private static $valueToName = [ + self::TENANCY_UNSPECIFIED => 'TENANCY_UNSPECIFIED', + self::PBDEFAULT => 'DEFAULT', + self::DEDICATED => 'DEDICATED', + self::HOST => 'HOST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tenancy::class, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement_Tenancy::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php new file mode 100644 index 000000000000..507b3ad8de02 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php @@ -0,0 +1,71 @@ +google.cloud.gkemulticloud.v1.AwsJsonWebKeys + */ +class AwsJsonWebKeys extends \Google\Protobuf\Internal\Message +{ + /** + * The public component of the keys used by the cluster to sign token + * requests. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; + */ + private $keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $keys + * The public component of the keys used by the cluster to sign token + * requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * The public component of the keys used by the cluster to sign token + * requests. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKeys() + { + return $this->keys; + } + + /** + * The public component of the keys used by the cluster to sign token + * requests. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\Jwk::class); + $this->keys = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php new file mode 100644 index 000000000000..9e560d4e09ec --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php @@ -0,0 +1,255 @@ +google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + */ +class AwsK8sVersionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes version name. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_of_life = false; + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_of_life_date = null; + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $release_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Kubernetes version name. + * @type bool $enabled + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * @type bool $end_of_life + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * @type \Google\Type\Date $end_of_life_date + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * @type \Google\Type\Date $release_date + * Optional. The date (in Pacific Time) when the cluster version was released. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes version name. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Kubernetes version name. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEndOfLife() + { + return $this->end_of_life; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEndOfLife($var) + { + GPBUtil::checkBool($var); + $this->end_of_life = $var; + + return $this; + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getEndOfLifeDate() + { + return $this->end_of_life_date; + } + + public function hasEndOfLifeDate() + { + return isset($this->end_of_life_date); + } + + public function clearEndOfLifeDate() + { + unset($this->end_of_life_date); + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndOfLifeDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_of_life_date = $var; + + return $this; + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getReleaseDate() + { + return $this->release_date; + } + + public function hasReleaseDate() + { + return isset($this->release_date); + } + + public function clearReleaseDate() + { + unset($this->release_date); + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setReleaseDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->release_date = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php new file mode 100644 index 000000000000..7109191a83c5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php @@ -0,0 +1,663 @@ +google.cloud.gkemulticloud.v1.AwsNodeConfig + */ +class AwsNodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. + * + * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $instance_type = ''; + /** + * Optional. Template for the root volume provisioned for node pool nodes. + * Volumes will be provisioned in the availability zone assigned + * to the node pool subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $root_volume = null; + /** + * Optional. The initial taints assigned to nodes of this node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $taints; + /** + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. + * + * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $iam_instance_profile = ''; + /** + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * + * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_type = ''; + /** + * Optional. The SSH configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ssh_config = null; + /** + * Optional. The IDs of additional security groups to add to nodes in this + * pool. The manager will automatically create security groups with minimum + * rules needed for a functioning cluster. + * + * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $security_group_ids; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + /** + * Required. Config encryption for user data. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config_encryption = null; + /** + * Optional. Placement related info for this node. + * When unspecified, the VPC's default tenancy will be used. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $instance_placement = null; + /** + * Optional. Configuration related to CloudWatch metrics collection on the + * Auto Scaling group of the node pool. + * When unspecified, metrics collection is disabled. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $autoscaling_metrics_collection = null; + /** + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $spot_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_type + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume + * Optional. Template for the root volume provisioned for node pool nodes. + * Volumes will be provisioned in the availability zone assigned + * to the node pool subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * @type array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $taints + * Optional. The initial taints assigned to nodes of this node pool. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * @type string $iam_instance_profile + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. + * @type string $image_type + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config + * Optional. The SSH configuration. + * @type array|\Google\Protobuf\Internal\RepeatedField $security_group_ids + * Optional. The IDs of additional security groups to add to nodes in this + * pool. The manager will automatically create security groups with minimum + * rules needed for a functioning cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $config_encryption + * Required. Config encryption for user data. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $instance_placement + * Optional. Placement related info for this node. + * When unspecified, the VPC's default tenancy will be used. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection $autoscaling_metrics_collection + * Optional. Configuration related to CloudWatch metrics collection on the + * Auto Scaling group of the node pool. + * When unspecified, metrics collection is disabled. + * @type \Google\Cloud\GkeMultiCloud\V1\SpotConfig $spot_config + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. + * + * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. + * + * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkString($var, True); + $this->instance_type = $var; + + return $this; + } + + /** + * Optional. Template for the root volume provisioned for node pool nodes. + * Volumes will be provisioned in the availability zone assigned + * to the node pool subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null + */ + public function getRootVolume() + { + return $this->root_volume; + } + + public function hasRootVolume() + { + return isset($this->root_volume); + } + + public function clearRootVolume() + { + unset($this->root_volume); + } + + /** + * Optional. Template for the root volume provisioned for node pool nodes. + * Volumes will be provisioned in the availability zone assigned + * to the node pool subnet. + * When unspecified, it defaults to 32 GiB with the GP2 volume type. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var + * @return $this + */ + public function setRootVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); + $this->root_volume = $var; + + return $this; + } + + /** + * Optional. The initial taints assigned to nodes of this node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaints() + { + return $this->taints; + } + + /** + * Optional. The initial taints assigned to nodes of this node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\NodeTaint::class); + $this->taints = $arr; + + return $this; + } + + /** + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. + * + * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getIamInstanceProfile() + { + return $this->iam_instance_profile; + } + + /** + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. + * + * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setIamInstanceProfile($var) + { + GPBUtil::checkString($var, True); + $this->iam_instance_profile = $var; + + return $this; + } + + /** + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * + * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageType() + { + return $this->image_type; + } + + /** + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * + * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageType($var) + { + GPBUtil::checkString($var, True); + $this->image_type = $var; + + return $this; + } + + /** + * Optional. The SSH configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig|null + */ + public function getSshConfig() + { + return $this->ssh_config; + } + + public function hasSshConfig() + { + return isset($this->ssh_config); + } + + public function clearSshConfig() + { + unset($this->ssh_config); + } + + /** + * Optional. The SSH configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $var + * @return $this + */ + public function setSshConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig::class); + $this->ssh_config = $var; + + return $this; + } + + /** + * Optional. The IDs of additional security groups to add to nodes in this + * pool. The manager will automatically create security groups with minimum + * rules needed for a functioning cluster. + * + * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityGroupIds() + { + return $this->security_group_ids; + } + + /** + * Optional. The IDs of additional security groups to add to nodes in this + * pool. The manager will automatically create security groups with minimum + * rules needed for a functioning cluster. + * + * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityGroupIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->security_group_ids = $arr; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + + /** + * Required. Config encryption for user data. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption|null + */ + public function getConfigEncryption() + { + return $this->config_encryption; + } + + public function hasConfigEncryption() + { + return isset($this->config_encryption); + } + + public function clearConfigEncryption() + { + unset($this->config_encryption); + } + + /** + * Required. Config encryption for user data. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $var + * @return $this + */ + public function setConfigEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption::class); + $this->config_encryption = $var; + + return $this; + } + + /** + * Optional. Placement related info for this node. + * When unspecified, the VPC's default tenancy will be used. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement|null + */ + public function getInstancePlacement() + { + return $this->instance_placement; + } + + public function hasInstancePlacement() + { + return isset($this->instance_placement); + } + + public function clearInstancePlacement() + { + unset($this->instance_placement); + } + + /** + * Optional. Placement related info for this node. + * When unspecified, the VPC's default tenancy will be used. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $var + * @return $this + */ + public function setInstancePlacement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement::class); + $this->instance_placement = $var; + + return $this; + } + + /** + * Optional. Configuration related to CloudWatch metrics collection on the + * Auto Scaling group of the node pool. + * When unspecified, metrics collection is disabled. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection|null + */ + public function getAutoscalingMetricsCollection() + { + return $this->autoscaling_metrics_collection; + } + + public function hasAutoscalingMetricsCollection() + { + return isset($this->autoscaling_metrics_collection); + } + + public function clearAutoscalingMetricsCollection() + { + unset($this->autoscaling_metrics_collection); + } + + /** + * Optional. Configuration related to CloudWatch metrics collection on the + * Auto Scaling group of the node pool. + * When unspecified, metrics collection is disabled. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection $var + * @return $this + */ + public function setAutoscalingMetricsCollection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection::class); + $this->autoscaling_metrics_collection = $var; + + return $this; + } + + /** + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\SpotConfig|null + */ + public function getSpotConfig() + { + return $this->spot_config; + } + + public function hasSpotConfig() + { + return isset($this->spot_config); + } + + public function clearSpotConfig() + { + unset($this->spot_config); + } + + /** + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\SpotConfig $var + * @return $this + */ + public function setSpotConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SpotConfig::class); + $this->spot_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php new file mode 100644 index 000000000000..881f7bcf2ef8 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php @@ -0,0 +1,80 @@ +google.cloud.gkemulticloud.v1.AwsNodeManagement + */ +class AwsNodeManagement extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * + * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_repair = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $auto_repair + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * + * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAutoRepair() + { + return $this->auto_repair; + } + + /** + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * + * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAutoRepair($var) + { + GPBUtil::checkBool($var); + $this->auto_repair = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php new file mode 100644 index 000000000000..e7187eca223d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php @@ -0,0 +1,727 @@ +google.cloud.gkemulticloud.v1.AwsNodePool + */ +class AwsNodePool extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Required. The configuration of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config = null; + /** + * Required. Autoscaler configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autoscaling = null; + /** + * Required. The subnet where the node pool node run. + * + * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subnet_id = ''; + /** + * Output only. The lifecycle state of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A globally unique identifier for the node pool. + * + * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. If set, there are currently changes in flight to the node + * pool. + * + * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The time at which this node pool was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this node pool was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 21; + */ + protected $etag = ''; + /** + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_pods_constraint = null; + /** + * Output only. A set of errors found in the node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $management = null; + /** + * Optional. Update settings control the speed and disruption of the update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * @type string $version + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $config + * Required. The configuration of the node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $autoscaling + * Required. Autoscaler configuration for this node pool. + * @type string $subnet_id + * Required. The subnet where the node pool node run. + * @type int $state + * Output only. The lifecycle state of the node pool. + * @type string $uid + * Output only. A globally unique identifier for the node pool. + * @type bool $reconciling + * Output only. If set, there are currently changes in flight to the node + * pool. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this node pool was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this node pool was last updated. + * @type string $etag + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. A set of errors found in the node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $management + * Optional. The Management configuration for this node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $update_settings + * Optional. Update settings control the speed and disruption of the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Required. The configuration of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Required. The configuration of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Required. Autoscaler configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling|null + */ + public function getAutoscaling() + { + return $this->autoscaling; + } + + public function hasAutoscaling() + { + return isset($this->autoscaling); + } + + public function clearAutoscaling() + { + unset($this->autoscaling); + } + + /** + * Required. Autoscaler configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $var + * @return $this + */ + public function setAutoscaling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling::class); + $this->autoscaling = $var; + + return $this; + } + + /** + * Required. The subnet where the node pool node run. + * + * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubnetId() + { + return $this->subnet_id; + } + + /** + * Required. The subnet where the node pool node run. + * + * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubnetId($var) + { + GPBUtil::checkString($var, True); + $this->subnet_id = $var; + + return $this; + } + + /** + * Output only. The lifecycle state of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The lifecycle state of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A globally unique identifier for the node pool. + * + * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A globally unique identifier for the node pool. + * + * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. If set, there are currently changes in flight to the node + * pool. + * + * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. If set, there are currently changes in flight to the node + * pool. + * + * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The time at which this node pool was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this node pool was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this node pool was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this node pool was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 21; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 21; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null + */ + public function getMaxPodsConstraint() + { + return $this->max_pods_constraint; + } + + public function hasMaxPodsConstraint() + { + return isset($this->max_pods_constraint); + } + + public function clearMaxPodsConstraint() + { + unset($this->max_pods_constraint); + } + + /** + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var + * @return $this + */ + public function setMaxPodsConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class); + $this->max_pods_constraint = $var; + + return $this; + } + + /** + * Output only. A set of errors found in the node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. A set of errors found in the node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError::class); + $this->errors = $arr; + + return $this; + } + + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement|null + */ + public function getManagement() + { + return $this->management; + } + + public function hasManagement() + { + return isset($this->management); + } + + public function clearManagement() + { + unset($this->management); + } + + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement::class); + $this->management = $var; + + return $this; + } + + /** + * Optional. Update settings control the speed and disruption of the update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateSettings|null + */ + public function getUpdateSettings() + { + return $this->update_settings; + } + + public function hasUpdateSettings() + { + return isset($this->update_settings); + } + + public function clearUpdateSettings() + { + unset($this->update_settings); + } + + /** + * Optional. Update settings control the speed and disruption of the update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $var + * @return $this + */ + public function setUpdateSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\UpdateSettings::class); + $this->update_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php new file mode 100644 index 000000000000..6c57e22b0028 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php @@ -0,0 +1,95 @@ +google.cloud.gkemulticloud.v1.AwsNodePool.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the node pool is being created. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the node pool has been created + * and is fully usable. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The RECONCILING state indicates that the node pool is being reconciled. + * + * Generated from protobuf enum RECONCILING = 3; + */ + const RECONCILING = 3; + /** + * The STOPPING state indicates the node pool is being deleted. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The ERROR state indicates the node pool is in a broken unrecoverable + * state. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * The DEGRADED state indicates the node pool requires user action to + * restore full functionality. + * + * Generated from protobuf enum DEGRADED = 6; + */ + const DEGRADED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::RECONCILING => 'RECONCILING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + self::DEGRADED => 'DEGRADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool_State::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php new file mode 100644 index 000000000000..fa2cda6ccf53 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php @@ -0,0 +1,110 @@ +google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + */ +class AwsNodePoolAutoscaling extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * + * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_node_count = 0; + /** + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * + * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_node_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $min_node_count + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * @type int $max_node_count + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * + * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMinNodeCount() + { + return $this->min_node_count; + } + + /** + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * + * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMinNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->min_node_count = $var; + + return $this; + } + + /** + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * + * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMaxNodeCount() + { + return $this->max_node_count; + } + + /** + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * + * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMaxNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->max_node_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php new file mode 100644 index 000000000000..c5a04b7d3934 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsNodePoolError + */ +class AwsNodePoolError extends \Google\Protobuf\Internal\Message +{ + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Human-friendly description of the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php new file mode 100644 index 000000000000..01857611cf0f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php @@ -0,0 +1,272 @@ +google.cloud.gkemulticloud.v1.AwsOpenIdConfig + */ +class AwsOpenIdConfig extends \Google\Protobuf\Internal\Message +{ + /** + * OIDC Issuer. + * + * Generated from protobuf field string issuer = 1; + */ + protected $issuer = ''; + /** + * JSON Web Key uri. + * + * Generated from protobuf field string jwks_uri = 2; + */ + protected $jwks_uri = ''; + /** + * Supported response types. + * + * Generated from protobuf field repeated string response_types_supported = 3; + */ + private $response_types_supported; + /** + * Supported subject types. + * + * Generated from protobuf field repeated string subject_types_supported = 4; + */ + private $subject_types_supported; + /** + * supported ID Token signing Algorithms. + * + * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; + */ + private $id_token_signing_alg_values_supported; + /** + * Supported claims. + * + * Generated from protobuf field repeated string claims_supported = 6; + */ + private $claims_supported; + /** + * Supported grant types. + * + * Generated from protobuf field repeated string grant_types = 7; + */ + private $grant_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer + * OIDC Issuer. + * @type string $jwks_uri + * JSON Web Key uri. + * @type array|\Google\Protobuf\Internal\RepeatedField $response_types_supported + * Supported response types. + * @type array|\Google\Protobuf\Internal\RepeatedField $subject_types_supported + * Supported subject types. + * @type array|\Google\Protobuf\Internal\RepeatedField $id_token_signing_alg_values_supported + * supported ID Token signing Algorithms. + * @type array|\Google\Protobuf\Internal\RepeatedField $claims_supported + * Supported claims. + * @type array|\Google\Protobuf\Internal\RepeatedField $grant_types + * Supported grant types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * OIDC Issuer. + * + * Generated from protobuf field string issuer = 1; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * OIDC Issuer. + * + * Generated from protobuf field string issuer = 1; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * JSON Web Key uri. + * + * Generated from protobuf field string jwks_uri = 2; + * @return string + */ + public function getJwksUri() + { + return $this->jwks_uri; + } + + /** + * JSON Web Key uri. + * + * Generated from protobuf field string jwks_uri = 2; + * @param string $var + * @return $this + */ + public function setJwksUri($var) + { + GPBUtil::checkString($var, True); + $this->jwks_uri = $var; + + return $this; + } + + /** + * Supported response types. + * + * Generated from protobuf field repeated string response_types_supported = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponseTypesSupported() + { + return $this->response_types_supported; + } + + /** + * Supported response types. + * + * Generated from protobuf field repeated string response_types_supported = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponseTypesSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->response_types_supported = $arr; + + return $this; + } + + /** + * Supported subject types. + * + * Generated from protobuf field repeated string subject_types_supported = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubjectTypesSupported() + { + return $this->subject_types_supported; + } + + /** + * Supported subject types. + * + * Generated from protobuf field repeated string subject_types_supported = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubjectTypesSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subject_types_supported = $arr; + + return $this; + } + + /** + * supported ID Token signing Algorithms. + * + * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIdTokenSigningAlgValuesSupported() + { + return $this->id_token_signing_alg_values_supported; + } + + /** + * supported ID Token signing Algorithms. + * + * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIdTokenSigningAlgValuesSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->id_token_signing_alg_values_supported = $arr; + + return $this; + } + + /** + * Supported claims. + * + * Generated from protobuf field repeated string claims_supported = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClaimsSupported() + { + return $this->claims_supported; + } + + /** + * Supported claims. + * + * Generated from protobuf field repeated string claims_supported = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClaimsSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->claims_supported = $arr; + + return $this; + } + + /** + * Supported grant types. + * + * Generated from protobuf field repeated string grant_types = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGrantTypes() + { + return $this->grant_types; + } + + /** + * Supported grant types. + * + * Generated from protobuf field repeated string grant_types = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGrantTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->grant_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php new file mode 100644 index 000000000000..2e5856c7b329 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php @@ -0,0 +1,121 @@ +google.cloud.gkemulticloud.v1.AwsProxyConfig + */ +class AwsProxyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy + * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file + * + * Generated from protobuf field string secret_arn = 1; + */ + protected $secret_arn = ''; + /** + * The version string of the AWS Secret Manager secret that contains the + * HTTP(S) proxy configuration. + * + * Generated from protobuf field string secret_version = 2; + */ + protected $secret_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_arn + * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy + * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file + * @type string $secret_version + * The version string of the AWS Secret Manager secret that contains the + * HTTP(S) proxy configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy + * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file + * + * Generated from protobuf field string secret_arn = 1; + * @return string + */ + public function getSecretArn() + { + return $this->secret_arn; + } + + /** + * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy + * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file + * + * Generated from protobuf field string secret_arn = 1; + * @param string $var + * @return $this + */ + public function setSecretArn($var) + { + GPBUtil::checkString($var, True); + $this->secret_arn = $var; + + return $this; + } + + /** + * The version string of the AWS Secret Manager secret that contains the + * HTTP(S) proxy configuration. + * + * Generated from protobuf field string secret_version = 2; + * @return string + */ + public function getSecretVersion() + { + return $this->secret_version; + } + + /** + * The version string of the AWS Secret Manager secret that contains the + * HTTP(S) proxy configuration. + * + * Generated from protobuf field string secret_version = 2; + * @param string $var + * @return $this + */ + public function setSecretVersion($var) + { + GPBUtil::checkString($var, True); + $this->secret_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php new file mode 100644 index 000000000000..04d329be8dfa --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php @@ -0,0 +1,147 @@ +google.cloud.gkemulticloud.v1.AwsServerConfig + */ +class AwsServerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the config. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + private $valid_versions; + /** + * The list of supported AWS regions. + * + * Generated from protobuf field repeated string supported_aws_regions = 3; + */ + private $supported_aws_regions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the config. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_aws_regions + * The list of supported AWS regions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the config. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the config. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidVersions() + { + return $this->valid_versions; + } + + /** + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo::class); + $this->valid_versions = $arr; + + return $this; + } + + /** + * The list of supported AWS regions. + * + * Generated from protobuf field repeated string supported_aws_regions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedAwsRegions() + { + return $this->supported_aws_regions; + } + + /** + * The list of supported AWS regions. + * + * Generated from protobuf field repeated string supported_aws_regions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedAwsRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_aws_regions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php new file mode 100644 index 000000000000..cef249ad091f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.AwsServicesAuthentication + */ +class AwsServicesAuthentication extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. + * + * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $role_arn = ''; + /** + * Optional. An identifier for the assumed role session. + * When unspecified, it defaults to `multicloud-service-agent`. + * + * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $role_session_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $role_arn + * Required. The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. + * @type string $role_session_name + * Optional. An identifier for the assumed role session. + * When unspecified, it defaults to `multicloud-service-agent`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. + * + * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRoleArn() + { + return $this->role_arn; + } + + /** + * Required. The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. + * + * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRoleArn($var) + { + GPBUtil::checkString($var, True); + $this->role_arn = $var; + + return $this; + } + + /** + * Optional. An identifier for the assumed role session. + * When unspecified, it defaults to `multicloud-service-agent`. + * + * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRoleSessionName() + { + return $this->role_session_name; + } + + /** + * Optional. An identifier for the assumed role session. + * When unspecified, it defaults to `multicloud-service-agent`. + * + * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRoleSessionName($var) + { + GPBUtil::checkString($var, True); + $this->role_session_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php new file mode 100644 index 000000000000..a3e356328b16 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsSshConfig + */ +class AwsSshConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the EC2 key pair used to login into cluster machines. + * + * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ec2_key_pair = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ec2_key_pair + * Required. The name of the EC2 key pair used to login into cluster machines. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the EC2 key pair used to login into cluster machines. + * + * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEc2KeyPair() + { + return $this->ec2_key_pair; + } + + /** + * Required. The name of the EC2 key pair used to login into cluster machines. + * + * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEc2KeyPair($var) + { + GPBUtil::checkString($var, True); + $this->ec2_key_pair = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php new file mode 100644 index 000000000000..4a6ca5810edc --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php @@ -0,0 +1,239 @@ +google.cloud.gkemulticloud.v1.AwsVolumeTemplate + */ +class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The size of the volume, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * + * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $size_gib = 0; + /** + * Optional. Type of the EBS volume. + * When unspecified, it defaults to GP2 volume. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $volume_type = 0; + /** + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. + * + * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $iops = 0; + /** + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * + * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $throughput = 0; + /** + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. + * If not specified, the default Amazon managed key associated to + * the AWS region where this cluster runs will be used. + * + * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key_arn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $size_gib + * Optional. The size of the volume, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * @type int $volume_type + * Optional. Type of the EBS volume. + * When unspecified, it defaults to GP2 volume. + * @type int $iops + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. + * @type int $throughput + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * @type string $kms_key_arn + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. + * If not specified, the default Amazon managed key associated to + * the AWS region where this cluster runs will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The size of the volume, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * + * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSizeGib() + { + return $this->size_gib; + } + + /** + * Optional. The size of the volume, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * + * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSizeGib($var) + { + GPBUtil::checkInt32($var); + $this->size_gib = $var; + + return $this; + } + + /** + * Optional. Type of the EBS volume. + * When unspecified, it defaults to GP2 volume. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVolumeType() + { + return $this->volume_type; + } + + /** + * Optional. Type of the EBS volume. + * When unspecified, it defaults to GP2 volume. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVolumeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate\VolumeType::class); + $this->volume_type = $var; + + return $this; + } + + /** + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. + * + * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIops() + { + return $this->iops; + } + + /** + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. + * + * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIops($var) + { + GPBUtil::checkInt32($var); + $this->iops = $var; + + return $this; + } + + /** + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * + * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getThroughput() + { + return $this->throughput; + } + + /** + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * + * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setThroughput($var) + { + GPBUtil::checkInt32($var); + $this->throughput = $var; + + return $this; + } + + /** + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. + * If not specified, the default Amazon managed key associated to + * the AWS region where this cluster runs will be used. + * + * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKeyArn() + { + return $this->kms_key_arn; + } + + /** + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. + * If not specified, the default Amazon managed key associated to + * the AWS region where this cluster runs will be used. + * + * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKeyArn($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_arn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php new file mode 100644 index 000000000000..8a88654de373 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType + */ +class VolumeType +{ + /** + * Not set. + * + * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; + */ + const VOLUME_TYPE_UNSPECIFIED = 0; + /** + * GP2 (General Purpose SSD volume type). + * + * Generated from protobuf enum GP2 = 1; + */ + const GP2 = 1; + /** + * GP3 (General Purpose SSD volume type). + * + * Generated from protobuf enum GP3 = 2; + */ + const GP3 = 2; + + private static $valueToName = [ + self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', + self::GP2 => 'GP2', + self::GP3 => 'GP3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VolumeType::class, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate_VolumeType::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php new file mode 100644 index 000000000000..25a4862f0652 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php @@ -0,0 +1,133 @@ +google.cloud.gkemulticloud.v1.AzureAuthorization + */ +class AzureAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_users; + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_groups; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminUsers() + { + return $this->admin_users; + } + + /** + * Optional. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterUser::class); + $this->admin_users = $arr; + + return $this; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminGroups() + { + return $this->admin_groups; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup::class); + $this->admin_groups = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php new file mode 100644 index 000000000000..002830ccfddd --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php @@ -0,0 +1,411 @@ +google.cloud.gkemulticloud.v1.AzureClient + */ +class AzureClient extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this resource. + * `AzureClient` resource names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The Azure Active Directory Tenant ID. + * + * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant_id = ''; + /** + * Required. The Azure Active Directory Application ID. + * + * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $application_id = ''; + /** + * Output only. If set, there are currently pending changes to the client. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. Annotations on the resource. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The PEM encoded x509 certificate. + * + * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pem_certificate = ''; + /** + * Output only. A globally unique identifier for the client. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time at which this resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this client was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this resource. + * `AzureClient` resource names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type string $tenant_id + * Required. The Azure Active Directory Tenant ID. + * @type string $application_id + * Required. The Azure Active Directory Application ID. + * @type bool $reconciling + * Output only. If set, there are currently pending changes to the client. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations on the resource. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type string $pem_certificate + * Output only. The PEM encoded x509 certificate. + * @type string $uid + * Output only. A globally unique identifier for the client. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this client was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of this resource. + * `AzureClient` resource names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this resource. + * `AzureClient` resource names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The Azure Active Directory Tenant ID. + * + * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTenantId() + { + return $this->tenant_id; + } + + /** + * Required. The Azure Active Directory Tenant ID. + * + * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTenantId($var) + { + GPBUtil::checkString($var, True); + $this->tenant_id = $var; + + return $this; + } + + /** + * Required. The Azure Active Directory Application ID. + * + * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getApplicationId() + { + return $this->application_id; + } + + /** + * Required. The Azure Active Directory Application ID. + * + * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setApplicationId($var) + { + GPBUtil::checkString($var, True); + $this->application_id = $var; + + return $this; + } + + /** + * Output only. If set, there are currently pending changes to the client. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. If set, there are currently pending changes to the client. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. Annotations on the resource. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations on the resource. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The PEM encoded x509 certificate. + * + * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPemCertificate() + { + return $this->pem_certificate; + } + + /** + * Output only. The PEM encoded x509 certificate. + * + * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPemCertificate($var) + { + GPBUtil::checkString($var, True); + $this->pem_certificate = $var; + + return $this; + } + + /** + * Output only. A globally unique identifier for the client. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A globally unique identifier for the client. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time at which this resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this client was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this client was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php new file mode 100644 index 000000000000..fb3117ed00b6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php @@ -0,0 +1,1087 @@ +google.cloud.gkemulticloud.v1.AzureCluster + */ +class AzureCluster extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. The Azure region where the cluster runs. + * Each Google Cloud region supports a subset of nearby Azure regions. + * You can call + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + * to list all supported Azure regions within a given Google Cloud region. + * + * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_region = ''; + /** + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: + * `/subscriptions//resourceGroups/` + * + * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_group_id = ''; + /** + * Optional. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. + * The `AzureClient` resource must reside on the same Google Cloud Platform + * project and region as the `AzureCluster`. + * `AzureClient` names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $azure_client = ''; + /** + * Required. Cluster-wide networking configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $networking = null; + /** + * Required. Configuration related to the cluster control plane. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $control_plane = null; + /** + * Required. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization = null; + /** + * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $azure_services_authentication = null; + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The endpoint of the cluster's API server. + * + * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $endpoint = ''; + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The time at which this cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 13; + */ + protected $etag = ''; + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_identity_config = null; + /** + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * + * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_ca_certificate = ''; + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet = null; + /** + * Output only. Managed Azure resources for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $managed_resources = null; + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $logging_config = null; + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $monitoring_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type string $description + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * @type string $azure_region + * Required. The Azure region where the cluster runs. + * Each Google Cloud region supports a subset of nearby Azure regions. + * You can call + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + * to list all supported Azure regions within a given Google Cloud region. + * @type string $resource_group_id + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: + * `/subscriptions//resourceGroups/` + * @type string $azure_client + * Optional. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. + * The `AzureClient` resource must reside on the same Google Cloud Platform + * project and region as the `AzureCluster`. + * `AzureClient` names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking $networking + * Required. Cluster-wide networking configuration. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane $control_plane + * Required. Configuration related to the cluster control plane. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization $authorization + * Required. Configuration related to the cluster RBAC settings. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $azure_services_authentication + * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. + * @type int $state + * Output only. The current state of the cluster. + * @type string $endpoint + * Output only. The endpoint of the cluster's API server. + * @type string $uid + * Output only. A globally unique identifier for the cluster. + * @type bool $reconciling + * Output only. If set, there are currently changes in flight to the cluster. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this cluster was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this cluster was last updated. + * @type string $etag + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config + * Output only. Workload Identity settings. + * @type string $cluster_ca_certificate + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet + * Required. Fleet configuration. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $managed_resources + * Output only. Managed Azure resources for this cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config + * Optional. Logging configuration for this cluster. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterError>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. A set of errors found in the cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config + * Optional. Monitoring configuration for this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this resource. + * Cluster names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A human readable description of this cluster. + * Cannot be longer than 255 UTF-8 encoded bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. The Azure region where the cluster runs. + * Each Google Cloud region supports a subset of nearby Azure regions. + * You can call + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + * to list all supported Azure regions within a given Google Cloud region. + * + * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAzureRegion() + { + return $this->azure_region; + } + + /** + * Required. The Azure region where the cluster runs. + * Each Google Cloud region supports a subset of nearby Azure regions. + * You can call + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + * to list all supported Azure regions within a given Google Cloud region. + * + * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAzureRegion($var) + { + GPBUtil::checkString($var, True); + $this->azure_region = $var; + + return $this; + } + + /** + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: + * `/subscriptions//resourceGroups/` + * + * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResourceGroupId() + { + return $this->resource_group_id; + } + + /** + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: + * `/subscriptions//resourceGroups/` + * + * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResourceGroupId($var) + { + GPBUtil::checkString($var, True); + $this->resource_group_id = $var; + + return $this; + } + + /** + * Optional. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. + * The `AzureClient` resource must reside on the same Google Cloud Platform + * project and region as the `AzureCluster`. + * `AzureClient` names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAzureClient() + { + return $this->azure_client; + } + + /** + * Optional. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. + * The `AzureClient` resource must reside on the same Google Cloud Platform + * project and region as the `AzureCluster`. + * `AzureClient` names are formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAzureClient($var) + { + GPBUtil::checkString($var, True); + $this->azure_client = $var; + + return $this; + } + + /** + * Required. Cluster-wide networking configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking|null + */ + public function getNetworking() + { + return $this->networking; + } + + public function hasNetworking() + { + return isset($this->networking); + } + + public function clearNetworking() + { + unset($this->networking); + } + + /** + * Required. Cluster-wide networking configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking $var + * @return $this + */ + public function setNetworking($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking::class); + $this->networking = $var; + + return $this; + } + + /** + * Required. Configuration related to the cluster control plane. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane|null + */ + public function getControlPlane() + { + return $this->control_plane; + } + + public function hasControlPlane() + { + return isset($this->control_plane); + } + + public function clearControlPlane() + { + unset($this->control_plane); + } + + /** + * Required. Configuration related to the cluster control plane. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane $var + * @return $this + */ + public function setControlPlane($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane::class); + $this->control_plane = $var; + + return $this; + } + + /** + * Required. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization|null + */ + public function getAuthorization() + { + return $this->authorization; + } + + public function hasAuthorization() + { + return isset($this->authorization); + } + + public function clearAuthorization() + { + unset($this->authorization); + } + + /** + * Required. Configuration related to the cluster RBAC settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization $var + * @return $this + */ + public function setAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization::class); + $this->authorization = $var; + + return $this; + } + + /** + * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication|null + */ + public function getAzureServicesAuthentication() + { + return $this->azure_services_authentication; + } + + public function hasAzureServicesAuthentication() + { + return isset($this->azure_services_authentication); + } + + public function clearAzureServicesAuthentication() + { + unset($this->azure_services_authentication); + } + + /** + * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $var + * @return $this + */ + public function setAzureServicesAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication::class); + $this->azure_services_authentication = $var; + + return $this; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The endpoint of the cluster's API server. + * + * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Output only. The endpoint of the cluster's API server. + * + * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. If set, there are currently changes in flight to the cluster. + * + * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The time at which this cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 13; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 13; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations on the cluster. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null + */ + public function getWorkloadIdentityConfig() + { + return $this->workload_identity_config; + } + + public function hasWorkloadIdentityConfig() + { + return isset($this->workload_identity_config); + } + + public function clearWorkloadIdentityConfig() + { + unset($this->workload_identity_config); + } + + /** + * Output only. Workload Identity settings. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var + * @return $this + */ + public function setWorkloadIdentityConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); + $this->workload_identity_config = $var; + + return $this; + } + + /** + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * + * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getClusterCaCertificate() + { + return $this->cluster_ca_certificate; + } + + /** + * Output only. PEM encoded x509 certificate of the cluster root of trust. + * + * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClusterCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->cluster_ca_certificate = $var; + + return $this; + } + + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null + */ + public function getFleet() + { + return $this->fleet; + } + + public function hasFleet() + { + return isset($this->fleet); + } + + public function clearFleet() + { + unset($this->fleet); + } + + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); + $this->fleet = $var; + + return $this; + } + + /** + * Output only. Managed Azure resources for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources|null + */ + public function getManagedResources() + { + return $this->managed_resources; + } + + public function hasManagedResources() + { + return isset($this->managed_resources); + } + + public function clearManagedResources() + { + unset($this->managed_resources); + } + + /** + * Output only. Managed Azure resources for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $var + * @return $this + */ + public function setManagedResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources::class); + $this->managed_resources = $var; + + return $this; + } + + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null + */ + public function getLoggingConfig() + { + return $this->logging_config; + } + + public function hasLoggingConfig() + { + return isset($this->logging_config); + } + + public function clearLoggingConfig() + { + unset($this->logging_config); + } + + /** + * Optional. Logging configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var + * @return $this + */ + public function setLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); + $this->logging_config = $var; + + return $this; + } + + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. A set of errors found in the cluster. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterError::class); + $this->errors = $arr; + + return $this; + } + + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null + */ + public function getMonitoringConfig() + { + return $this->monitoring_config; + } + + public function hasMonitoringConfig() + { + return isset($this->monitoring_config); + } + + public function clearMonitoringConfig() + { + unset($this->monitoring_config); + } + + /** + * Optional. Monitoring configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var + * @return $this + */ + public function setMonitoringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); + $this->monitoring_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php new file mode 100644 index 000000000000..e62a7b58f248 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php @@ -0,0 +1,96 @@ +google.cloud.gkemulticloud.v1.AzureCluster.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the cluster is being created. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the cluster has been created and is fully + * usable. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The RECONCILING state indicates that some work is actively being done on + * the cluster, such as upgrading the control plane replicas. + * + * Generated from protobuf enum RECONCILING = 3; + */ + const RECONCILING = 3; + /** + * The STOPPING state indicates the cluster is being deleted. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The ERROR state indicates the cluster is in a broken unrecoverable + * state. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * The DEGRADED state indicates the cluster requires user action to + * restore full functionality. + * + * Generated from protobuf enum DEGRADED = 6; + */ + const DEGRADED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::RECONCILING => 'RECONCILING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + self::DEGRADED => 'DEGRADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AzureCluster_State::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php new file mode 100644 index 000000000000..cf9a9b6b2e5d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AzureClusterError + */ +class AzureClusterError extends \Google\Protobuf\Internal\Message +{ + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Human-friendly description of the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php new file mode 100644 index 000000000000..dee74b296f31 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AzureClusterGroup + */ +class AzureClusterGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The name of the group, e.g. `my-group@domain.com`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The name of the group, e.g. `my-group@domain.com`. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php new file mode 100644 index 000000000000..c4425dee6e7c --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php @@ -0,0 +1,241 @@ +google.cloud.gkemulticloud.v1.AzureClusterNetworking + */ +class AzureClusterNetworking extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. + * All components in the cluster (i.e. control plane and node pools) run on a + * single VNet. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + * This field cannot be changed after creation. + * + * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $virtual_network_id = ''; + /** + * Required. The IP address range of the pods in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All pods in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creation. + * + * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $pod_address_cidr_blocks; + /** + * Required. The IP address range for services in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All services in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creating a cluster. + * + * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $service_address_cidr_blocks; + /** + * Optional. The ARM ID of the subnet where Kubernetes private service type + * load balancers are deployed. When unspecified, it defaults to + * AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" + * + * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_load_balancer_subnet_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $virtual_network_id + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. + * All components in the cluster (i.e. control plane and node pools) run on a + * single VNet. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + * This field cannot be changed after creation. + * @type array|\Google\Protobuf\Internal\RepeatedField $pod_address_cidr_blocks + * Required. The IP address range of the pods in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All pods in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creation. + * @type array|\Google\Protobuf\Internal\RepeatedField $service_address_cidr_blocks + * Required. The IP address range for services in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All services in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creating a cluster. + * @type string $service_load_balancer_subnet_id + * Optional. The ARM ID of the subnet where Kubernetes private service type + * load balancers are deployed. When unspecified, it defaults to + * AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. + * All components in the cluster (i.e. control plane and node pools) run on a + * single VNet. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + * This field cannot be changed after creation. + * + * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVirtualNetworkId() + { + return $this->virtual_network_id; + } + + /** + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. + * All components in the cluster (i.e. control plane and node pools) run on a + * single VNet. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + * This field cannot be changed after creation. + * + * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVirtualNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->virtual_network_id = $var; + + return $this; + } + + /** + * Required. The IP address range of the pods in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All pods in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creation. + * + * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPodAddressCidrBlocks() + { + return $this->pod_address_cidr_blocks; + } + + /** + * Required. The IP address range of the pods in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All pods in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creation. + * + * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPodAddressCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->pod_address_cidr_blocks = $arr; + + return $this; + } + + /** + * Required. The IP address range for services in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All services in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creating a cluster. + * + * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceAddressCidrBlocks() + { + return $this->service_address_cidr_blocks; + } + + /** + * Required. The IP address range for services in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * All services in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * This field cannot be changed after creating a cluster. + * + * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceAddressCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_address_cidr_blocks = $arr; + + return $this; + } + + /** + * Optional. The ARM ID of the subnet where Kubernetes private service type + * load balancers are deployed. When unspecified, it defaults to + * AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" + * + * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceLoadBalancerSubnetId() + { + return $this->service_load_balancer_subnet_id; + } + + /** + * Optional. The ARM ID of the subnet where Kubernetes private service type + * load balancers are deployed. When unspecified, it defaults to + * AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" + * + * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceLoadBalancerSubnetId($var) + { + GPBUtil::checkString($var, True); + $this->service_load_balancer_subnet_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php new file mode 100644 index 000000000000..ca301cadedac --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php @@ -0,0 +1,102 @@ +google.cloud.gkemulticloud.v1.AzureClusterResources + */ +class AzureClusterResources extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The ARM ID of the cluster network security group. + * + * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $network_security_group_id = ''; + /** + * Output only. The ARM ID of the control plane application security group. + * + * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $control_plane_application_security_group_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_security_group_id + * Output only. The ARM ID of the cluster network security group. + * @type string $control_plane_application_security_group_id + * Output only. The ARM ID of the control plane application security group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The ARM ID of the cluster network security group. + * + * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNetworkSecurityGroupId() + { + return $this->network_security_group_id; + } + + /** + * Output only. The ARM ID of the cluster network security group. + * + * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNetworkSecurityGroupId($var) + { + GPBUtil::checkString($var, True); + $this->network_security_group_id = $var; + + return $this; + } + + /** + * Output only. The ARM ID of the control plane application security group. + * + * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getControlPlaneApplicationSecurityGroupId() + { + return $this->control_plane_application_security_group_id; + } + + /** + * Output only. The ARM ID of the control plane application security group. + * + * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setControlPlaneApplicationSecurityGroupId($var) + { + GPBUtil::checkString($var, True); + $this->control_plane_application_security_group_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php new file mode 100644 index 000000000000..3aecd59fbf61 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AzureClusterUser + */ +class AzureClusterUser extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php new file mode 100644 index 000000000000..f90fcdd501a4 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php @@ -0,0 +1,131 @@ +google.cloud.gkemulticloud.v1.AzureConfigEncryption + */ +class AzureConfigEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * + * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_id = ''; + /** + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. + * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) + * in ASN.1 DER form. The string must be comprised of a single PEM block of + * type "PUBLIC KEY". + * + * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $public_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_id + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * @type string $public_key + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. + * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) + * in ASN.1 DER form. The string must be comprised of a single PEM block of + * type "PUBLIC KEY". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * + * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKeyId() + { + return $this->key_id; + } + + /** + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * + * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKeyId($var) + { + GPBUtil::checkString($var, True); + $this->key_id = $var; + + return $this; + } + + /** + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. + * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) + * in ASN.1 DER form. The string must be comprised of a single PEM block of + * type "PUBLIC KEY". + * + * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. + * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) + * in ASN.1 DER form. The string must be comprised of a single PEM block of + * type "PUBLIC KEY". + * + * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php new file mode 100644 index 000000000000..92f3fed0095f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php @@ -0,0 +1,613 @@ +google.cloud.gkemulticloud.v1.AzureControlPlane + */ +class AzureControlPlane extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless + * `AzureControlPlane.replica_placements` is specified. This subnet will also + * be used as default for `AzureControlPlane.endpoint_subnet_id` if + * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will + * be used as default for + * `AzureClusterNetworking.service_load_balancer_subnet_id`. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. + * + * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet_id = ''; + /** + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * For available VM sizes, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. + * When unspecified, it defaults to `Standard_DS2_v2`. + * + * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vm_size = ''; + /** + * Required. SSH configuration for how to access the underlying control plane + * machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssh_config = null; + /** + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * When unspecified, it defaults to 32-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $root_volume = null; + /** + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * When unspecified, it defaults to a 8-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $main_volume = null; + /** + * Optional. Configuration related to application-layer secrets encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $database_encryption = null; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + /** + * Optional. Configuration related to vm config encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $config_encryption = null; + /** + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. + * + * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Optional. Configuration for where to place the control plane replicas. + * Up to three replica placement instances can be specified. If + * replica_placements is set, the replica placement instances will be applied + * to the three control plane replicas as evenly as possible. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $replica_placements; + /** + * Optional. The ARM ID of the subnet where the control plane load balancer is + * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" + * + * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $endpoint_subnet_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + * @type string $subnet_id + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless + * `AzureControlPlane.replica_placements` is specified. This subnet will also + * be used as default for `AzureControlPlane.endpoint_subnet_id` if + * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will + * be used as default for + * `AzureClusterNetworking.service_load_balancer_subnet_id`. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. + * @type string $vm_size + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * For available VM sizes, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. + * When unspecified, it defaults to `Standard_DS2_v2`. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config + * Required. SSH configuration for how to access the underlying control plane + * machines. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $root_volume + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * When unspecified, it defaults to 32-GiB Azure Disk. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $main_volume + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * When unspecified, it defaults to a 8-GiB Azure Disk. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption $database_encryption + * Optional. Configuration related to application-layer secrets encryption. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $config_encryption + * Optional. Configuration related to vm config encryption. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. + * @type array<\Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement>|\Google\Protobuf\Internal\RepeatedField $replica_placements + * Optional. Configuration for where to place the control plane replicas. + * Up to three replica placement instances can be specified. If + * replica_placements is set, the replica placement instances will be applied + * to the three control plane replicas as evenly as possible. + * @type string $endpoint_subnet_id + * Optional. The ARM ID of the subnet where the control plane load balancer is + * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless + * `AzureControlPlane.replica_placements` is specified. This subnet will also + * be used as default for `AzureControlPlane.endpoint_subnet_id` if + * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will + * be used as default for + * `AzureClusterNetworking.service_load_balancer_subnet_id`. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. + * + * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnetId() + { + return $this->subnet_id; + } + + /** + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless + * `AzureControlPlane.replica_placements` is specified. This subnet will also + * be used as default for `AzureControlPlane.endpoint_subnet_id` if + * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will + * be used as default for + * `AzureClusterNetworking.service_load_balancer_subnet_id`. + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. + * + * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnetId($var) + { + GPBUtil::checkString($var, True); + $this->subnet_id = $var; + + return $this; + } + + /** + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * For available VM sizes, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. + * When unspecified, it defaults to `Standard_DS2_v2`. + * + * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVmSize() + { + return $this->vm_size; + } + + /** + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * For available VM sizes, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. + * When unspecified, it defaults to `Standard_DS2_v2`. + * + * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVmSize($var) + { + GPBUtil::checkString($var, True); + $this->vm_size = $var; + + return $this; + } + + /** + * Required. SSH configuration for how to access the underlying control plane + * machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig|null + */ + public function getSshConfig() + { + return $this->ssh_config; + } + + public function hasSshConfig() + { + return isset($this->ssh_config); + } + + public function clearSshConfig() + { + unset($this->ssh_config); + } + + /** + * Required. SSH configuration for how to access the underlying control plane + * machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $var + * @return $this + */ + public function setSshConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig::class); + $this->ssh_config = $var; + + return $this; + } + + /** + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * When unspecified, it defaults to 32-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null + */ + public function getRootVolume() + { + return $this->root_volume; + } + + public function hasRootVolume() + { + return isset($this->root_volume); + } + + public function clearRootVolume() + { + unset($this->root_volume); + } + + /** + * Optional. Configuration related to the root volume provisioned for each + * control plane replica. + * When unspecified, it defaults to 32-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var + * @return $this + */ + public function setRootVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); + $this->root_volume = $var; + + return $this; + } + + /** + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * When unspecified, it defaults to a 8-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null + */ + public function getMainVolume() + { + return $this->main_volume; + } + + public function hasMainVolume() + { + return isset($this->main_volume); + } + + public function clearMainVolume() + { + unset($this->main_volume); + } + + /** + * Optional. Configuration related to the main volume provisioned for each + * control plane replica. + * The main volume is in charge of storing all of the cluster's etcd state. + * When unspecified, it defaults to a 8-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var + * @return $this + */ + public function setMainVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); + $this->main_volume = $var; + + return $this; + } + + /** + * Optional. Configuration related to application-layer secrets encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption|null + */ + public function getDatabaseEncryption() + { + return $this->database_encryption; + } + + public function hasDatabaseEncryption() + { + return isset($this->database_encryption); + } + + public function clearDatabaseEncryption() + { + unset($this->database_encryption); + } + + /** + * Optional. Configuration related to application-layer secrets encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption $var + * @return $this + */ + public function setDatabaseEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption::class); + $this->database_encryption = $var; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + + /** + * Optional. Configuration related to vm config encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption|null + */ + public function getConfigEncryption() + { + return $this->config_encryption; + } + + public function hasConfigEncryption() + { + return isset($this->config_encryption); + } + + public function clearConfigEncryption() + { + unset($this->config_encryption); + } + + /** + * Optional. Configuration related to vm config encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $var + * @return $this + */ + public function setConfigEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption::class); + $this->config_encryption = $var; + + return $this; + } + + /** + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. + * + * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. + * + * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Optional. Configuration for where to place the control plane replicas. + * Up to three replica placement instances can be specified. If + * replica_placements is set, the replica placement instances will be applied + * to the three control plane replicas as evenly as possible. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicaPlacements() + { + return $this->replica_placements; + } + + /** + * Optional. Configuration for where to place the control plane replicas. + * Up to three replica placement instances can be specified. If + * replica_placements is set, the replica placement instances will be applied + * to the three control plane replicas as evenly as possible. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicaPlacements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement::class); + $this->replica_placements = $arr; + + return $this; + } + + /** + * Optional. The ARM ID of the subnet where the control plane load balancer is + * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" + * + * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEndpointSubnetId() + { + return $this->endpoint_subnet_id; + } + + /** + * Optional. The ARM ID of the subnet where the control plane load balancer is + * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. + * Example: + * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" + * + * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEndpointSubnetId($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_subnet_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php new file mode 100644 index 000000000000..21c7b8009267 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php @@ -0,0 +1,85 @@ +google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + */ +class AzureDatabaseEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * Encryption will always take the latest version of the key and hence + * specific version is not supported. + * + * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_id + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * Encryption will always take the latest version of the key and hence + * specific version is not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * Encryption will always take the latest version of the key and hence + * specific version is not supported. + * + * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKeyId() + { + return $this->key_id; + } + + /** + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. + * For example: + * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + * Encryption will always take the latest version of the key and hence + * specific version is not supported. + * + * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKeyId($var) + { + GPBUtil::checkString($var, True); + $this->key_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php new file mode 100644 index 000000000000..f3c1a39446b7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php @@ -0,0 +1,75 @@ +google.cloud.gkemulticloud.v1.AzureDiskTemplate + */ +class AzureDiskTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The size of the disk, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * + * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $size_gib = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $size_gib + * Optional. The size of the disk, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The size of the disk, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * + * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSizeGib() + { + return $this->size_gib; + } + + /** + * Optional. The size of the disk, in GiBs. + * When unspecified, a default value is provided. See the specific reference + * in the parent resource. + * + * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSizeGib($var) + { + GPBUtil::checkInt32($var); + $this->size_gib = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php new file mode 100644 index 000000000000..bc3324265977 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php @@ -0,0 +1,71 @@ +google.cloud.gkemulticloud.v1.AzureJsonWebKeys + */ +class AzureJsonWebKeys extends \Google\Protobuf\Internal\Message +{ + /** + * The public component of the keys used by the cluster to sign token + * requests. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; + */ + private $keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $keys + * The public component of the keys used by the cluster to sign token + * requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * The public component of the keys used by the cluster to sign token + * requests. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKeys() + { + return $this->keys; + } + + /** + * The public component of the keys used by the cluster to sign token + * requests. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\Jwk::class); + $this->keys = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php new file mode 100644 index 000000000000..c454dce8f80f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php @@ -0,0 +1,255 @@ +google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + */ +class AzureK8sVersionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes version name (for example, `1.19.10-gke.1000`) + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_of_life = false; + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_of_life_date = null; + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $release_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Kubernetes version name (for example, `1.19.10-gke.1000`) + * @type bool $enabled + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * @type bool $end_of_life + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * @type \Google\Type\Date $end_of_life_date + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * @type \Google\Type\Date $release_date + * Optional. The date (in Pacific Time) when the cluster version was released. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes version name (for example, `1.19.10-gke.1000`) + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Kubernetes version name (for example, `1.19.10-gke.1000`) + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEndOfLife() + { + return $this->end_of_life; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEndOfLife($var) + { + GPBUtil::checkBool($var); + $this->end_of_life = $var; + + return $this; + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getEndOfLifeDate() + { + return $this->end_of_life_date; + } + + public function hasEndOfLifeDate() + { + return isset($this->end_of_life_date); + } + + public function clearEndOfLifeDate() + { + unset($this->end_of_life_date); + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndOfLifeDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_of_life_date = $var; + + return $this; + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getReleaseDate() + { + return $this->release_date; + } + + public function hasReleaseDate() + { + return isset($this->release_date); + } + + public function clearReleaseDate() + { + unset($this->release_date); + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setReleaseDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->release_date = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php new file mode 100644 index 000000000000..8167a17060ad --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php @@ -0,0 +1,432 @@ +google.cloud.gkemulticloud.v1.AzureNodeConfig + */ +class AzureNodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * See [Supported VM + * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. + * When unspecified, it defaults to `Standard_DS2_v2`. + * + * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vm_size = ''; + /** + * Optional. Configuration related to the root volume provisioned for each + * node pool machine. + * When unspecified, it defaults to a 32-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $root_volume = null; + /** + * Optional. A set of tags to apply to all underlying Azure resources for this + * node pool. This currently only includes Virtual Machine Scale Sets. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * + * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_type = ''; + /** + * Required. SSH configuration for how to access the node pool machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssh_config = null; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + /** + * Optional. Configuration related to vm config encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $config_encryption = null; + /** + * Optional. The initial taints assigned to nodes of this node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $taints; + /** + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_size + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * See [Supported VM + * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. + * When unspecified, it defaults to `Standard_DS2_v2`. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $root_volume + * Optional. Configuration related to the root volume provisioned for each + * node pool machine. + * When unspecified, it defaults to a 32-GiB Azure Disk. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. A set of tags to apply to all underlying Azure resources for this + * node pool. This currently only includes Virtual Machine Scale Sets. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * @type string $image_type + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config + * Required. SSH configuration for how to access the node pool machines. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $config_encryption + * Optional. Configuration related to vm config encryption. + * @type array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $taints + * Optional. The initial taints assigned to nodes of this node pool. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * See [Supported VM + * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. + * When unspecified, it defaults to `Standard_DS2_v2`. + * + * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVmSize() + { + return $this->vm_size; + } + + /** + * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + * See [Supported VM + * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. + * When unspecified, it defaults to `Standard_DS2_v2`. + * + * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVmSize($var) + { + GPBUtil::checkString($var, True); + $this->vm_size = $var; + + return $this; + } + + /** + * Optional. Configuration related to the root volume provisioned for each + * node pool machine. + * When unspecified, it defaults to a 32-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null + */ + public function getRootVolume() + { + return $this->root_volume; + } + + public function hasRootVolume() + { + return isset($this->root_volume); + } + + public function clearRootVolume() + { + unset($this->root_volume); + } + + /** + * Optional. Configuration related to the root volume provisioned for each + * node pool machine. + * When unspecified, it defaults to a 32-GiB Azure Disk. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var + * @return $this + */ + public function setRootVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); + $this->root_volume = $var; + + return $this; + } + + /** + * Optional. A set of tags to apply to all underlying Azure resources for this + * node pool. This currently only includes Virtual Machine Scale Sets. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. A set of tags to apply to all underlying Azure resources for this + * node pool. This currently only includes Virtual Machine Scale Sets. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. + * + * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * + * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageType() + { + return $this->image_type; + } + + /** + * Optional. The OS image type to use on node pool instances. + * Can be unspecified, or have a value of `ubuntu`. + * When unspecified, it defaults to `ubuntu`. + * + * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageType($var) + { + GPBUtil::checkString($var, True); + $this->image_type = $var; + + return $this; + } + + /** + * Required. SSH configuration for how to access the node pool machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig|null + */ + public function getSshConfig() + { + return $this->ssh_config; + } + + public function hasSshConfig() + { + return isset($this->ssh_config); + } + + public function clearSshConfig() + { + unset($this->ssh_config); + } + + /** + * Required. SSH configuration for how to access the node pool machines. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $var + * @return $this + */ + public function setSshConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig::class); + $this->ssh_config = $var; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + + /** + * Optional. Configuration related to vm config encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption|null + */ + public function getConfigEncryption() + { + return $this->config_encryption; + } + + public function hasConfigEncryption() + { + return isset($this->config_encryption); + } + + public function clearConfigEncryption() + { + unset($this->config_encryption); + } + + /** + * Optional. Configuration related to vm config encryption. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $var + * @return $this + */ + public function setConfigEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption::class); + $this->config_encryption = $var; + + return $this; + } + + /** + * Optional. The initial taints assigned to nodes of this node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaints() + { + return $this->taints; + } + + /** + * Optional. The initial taints assigned to nodes of this node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\NodeTaint::class); + $this->taints = $arr; + + return $this; + } + + /** + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The initial labels assigned to nodes of this node pool. An object + * containing a list of "key": value pairs. Example: { "name": "wrench", + * "mass": "1.3kg", "count": "3" }. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php new file mode 100644 index 000000000000..fafb582d67b4 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php @@ -0,0 +1,80 @@ +google.cloud.gkemulticloud.v1.AzureNodeManagement + */ +class AzureNodeManagement extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * + * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_repair = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $auto_repair + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * + * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAutoRepair() + { + return $this->auto_repair; + } + + /** + * Optional. Whether or not the nodes will be automatically repaired. When set + * to true, the nodes in this node pool will be monitored and if they fail + * health checks consistently over a period of time, an automatic repair + * action will be triggered to replace them with new nodes. + * + * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAutoRepair($var) + { + GPBUtil::checkBool($var); + $this->auto_repair = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php new file mode 100644 index 000000000000..d2fd28ceca6e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php @@ -0,0 +1,713 @@ +google.cloud.gkemulticloud.v1.AzureNodePool + */ +class AzureNodePool extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Required. The node configuration of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config = null; + /** + * Required. The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. + * + * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subnet_id = ''; + /** + * Required. Autoscaler configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autoscaling = null; + /** + * Output only. The current state of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A globally unique identifier for the node pool. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. If set, there are currently pending changes to the node + * pool. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The time at which this node pool was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this node pool was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 12; + */ + protected $etag = ''; + /** + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_pods_constraint = null; + /** + * Optional. The Azure availability zone of the nodes in this nodepool. + * When unspecified, it defaults to `1`. + * + * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $azure_availability_zone = ''; + /** + * Output only. A set of errors found in the node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $management = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * @type string $version + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig $config + * Required. The node configuration of the node pool. + * @type string $subnet_id + * Required. The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling $autoscaling + * Required. Autoscaler configuration for this node pool. + * @type int $state + * Output only. The current state of the node pool. + * @type string $uid + * Output only. A globally unique identifier for the node pool. + * @type bool $reconciling + * Output only. If set, there are currently pending changes to the node + * pool. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this node pool was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this node pool was last updated. + * @type string $etag + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * @type string $azure_availability_zone + * Optional. The Azure availability zone of the nodes in this nodepool. + * When unspecified, it defaults to `1`. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. A set of errors found in the node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $management + * Optional. The Management configuration for this node pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this resource. + * Node pool names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * For more details on Google Cloud resource names, + * see [Resource Names](https://cloud.google.com/apis/design/resource_names) + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Required. The node configuration of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Required. The node configuration of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Required. The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. + * + * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubnetId() + { + return $this->subnet_id; + } + + /** + * Required. The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. + * + * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubnetId($var) + { + GPBUtil::checkString($var, True); + $this->subnet_id = $var; + + return $this; + } + + /** + * Required. Autoscaler configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling|null + */ + public function getAutoscaling() + { + return $this->autoscaling; + } + + public function hasAutoscaling() + { + return isset($this->autoscaling); + } + + public function clearAutoscaling() + { + unset($this->autoscaling); + } + + /** + * Required. Autoscaler configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling $var + * @return $this + */ + public function setAutoscaling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling::class); + $this->autoscaling = $var; + + return $this; + } + + /** + * Output only. The current state of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A globally unique identifier for the node pool. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A globally unique identifier for the node pool. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. If set, there are currently pending changes to the node + * pool. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. If set, there are currently pending changes to the node + * pool. + * + * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The time at which this node pool was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this node pool was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this node pool was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this node pool was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 12; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Allows clients to perform consistent read-modify-writes + * through optimistic concurrency control. + * Can be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 12; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Annotations on the node pool. + * This field has the same restrictions as Kubernetes annotations. + * The total size of all keys and values combined is limited to 256k. + * Keys can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null + */ + public function getMaxPodsConstraint() + { + return $this->max_pods_constraint; + } + + public function hasMaxPodsConstraint() + { + return isset($this->max_pods_constraint); + } + + public function clearMaxPodsConstraint() + { + unset($this->max_pods_constraint); + } + + /** + * Required. The constraint on the maximum number of pods that can be run + * simultaneously on a node in the node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var + * @return $this + */ + public function setMaxPodsConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class); + $this->max_pods_constraint = $var; + + return $this; + } + + /** + * Optional. The Azure availability zone of the nodes in this nodepool. + * When unspecified, it defaults to `1`. + * + * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAzureAvailabilityZone() + { + return $this->azure_availability_zone; + } + + /** + * Optional. The Azure availability zone of the nodes in this nodepool. + * When unspecified, it defaults to `1`. + * + * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAzureAvailabilityZone($var) + { + GPBUtil::checkString($var, True); + $this->azure_availability_zone = $var; + + return $this; + } + + /** + * Output only. A set of errors found in the node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. A set of errors found in the node pool. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError::class); + $this->errors = $arr; + + return $this; + } + + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement|null + */ + public function getManagement() + { + return $this->management; + } + + public function hasManagement() + { + return isset($this->management); + } + + public function clearManagement() + { + unset($this->management); + } + + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement::class); + $this->management = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php new file mode 100644 index 000000000000..1d994d640f61 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php @@ -0,0 +1,95 @@ +google.cloud.gkemulticloud.v1.AzureNodePool.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the node pool is being created. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the node pool has been created and is fully + * usable. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The RECONCILING state indicates that the node pool is being reconciled. + * + * Generated from protobuf enum RECONCILING = 3; + */ + const RECONCILING = 3; + /** + * The STOPPING state indicates the node pool is being deleted. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The ERROR state indicates the node pool is in a broken unrecoverable + * state. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * The DEGRADED state indicates the node pool requires user action to + * restore full functionality. + * + * Generated from protobuf enum DEGRADED = 6; + */ + const DEGRADED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::RECONCILING => 'RECONCILING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + self::DEGRADED => 'DEGRADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool_State::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php new file mode 100644 index 000000000000..2688e11da544 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php @@ -0,0 +1,111 @@ +google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + */ +class AzureNodePoolAutoscaling extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * + * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_node_count = 0; + /** + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * + * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_node_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $min_node_count + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * @type int $max_node_count + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * + * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMinNodeCount() + { + return $this->min_node_count; + } + + /** + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * + * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMinNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->min_node_count = $var; + + return $this; + } + + /** + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * + * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMaxNodeCount() + { + return $this->max_node_count; + } + + /** + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * + * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMaxNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->max_node_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php new file mode 100644 index 000000000000..854ce75b671a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.AzureNodePoolError + */ +class AzureNodePoolError extends \Google\Protobuf\Internal\Message +{ + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Human-friendly description of the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-friendly description of the error. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php new file mode 100644 index 000000000000..cad099ee30e3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php @@ -0,0 +1,272 @@ +google.cloud.gkemulticloud.v1.AzureOpenIdConfig + */ +class AzureOpenIdConfig extends \Google\Protobuf\Internal\Message +{ + /** + * OIDC Issuer. + * + * Generated from protobuf field string issuer = 1; + */ + protected $issuer = ''; + /** + * JSON Web Key uri. + * + * Generated from protobuf field string jwks_uri = 2; + */ + protected $jwks_uri = ''; + /** + * Supported response types. + * + * Generated from protobuf field repeated string response_types_supported = 3; + */ + private $response_types_supported; + /** + * Supported subject types. + * + * Generated from protobuf field repeated string subject_types_supported = 4; + */ + private $subject_types_supported; + /** + * supported ID Token signing Algorithms. + * + * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; + */ + private $id_token_signing_alg_values_supported; + /** + * Supported claims. + * + * Generated from protobuf field repeated string claims_supported = 6; + */ + private $claims_supported; + /** + * Supported grant types. + * + * Generated from protobuf field repeated string grant_types = 7; + */ + private $grant_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer + * OIDC Issuer. + * @type string $jwks_uri + * JSON Web Key uri. + * @type array|\Google\Protobuf\Internal\RepeatedField $response_types_supported + * Supported response types. + * @type array|\Google\Protobuf\Internal\RepeatedField $subject_types_supported + * Supported subject types. + * @type array|\Google\Protobuf\Internal\RepeatedField $id_token_signing_alg_values_supported + * supported ID Token signing Algorithms. + * @type array|\Google\Protobuf\Internal\RepeatedField $claims_supported + * Supported claims. + * @type array|\Google\Protobuf\Internal\RepeatedField $grant_types + * Supported grant types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * OIDC Issuer. + * + * Generated from protobuf field string issuer = 1; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * OIDC Issuer. + * + * Generated from protobuf field string issuer = 1; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * JSON Web Key uri. + * + * Generated from protobuf field string jwks_uri = 2; + * @return string + */ + public function getJwksUri() + { + return $this->jwks_uri; + } + + /** + * JSON Web Key uri. + * + * Generated from protobuf field string jwks_uri = 2; + * @param string $var + * @return $this + */ + public function setJwksUri($var) + { + GPBUtil::checkString($var, True); + $this->jwks_uri = $var; + + return $this; + } + + /** + * Supported response types. + * + * Generated from protobuf field repeated string response_types_supported = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponseTypesSupported() + { + return $this->response_types_supported; + } + + /** + * Supported response types. + * + * Generated from protobuf field repeated string response_types_supported = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponseTypesSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->response_types_supported = $arr; + + return $this; + } + + /** + * Supported subject types. + * + * Generated from protobuf field repeated string subject_types_supported = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubjectTypesSupported() + { + return $this->subject_types_supported; + } + + /** + * Supported subject types. + * + * Generated from protobuf field repeated string subject_types_supported = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubjectTypesSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subject_types_supported = $arr; + + return $this; + } + + /** + * supported ID Token signing Algorithms. + * + * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIdTokenSigningAlgValuesSupported() + { + return $this->id_token_signing_alg_values_supported; + } + + /** + * supported ID Token signing Algorithms. + * + * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIdTokenSigningAlgValuesSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->id_token_signing_alg_values_supported = $arr; + + return $this; + } + + /** + * Supported claims. + * + * Generated from protobuf field repeated string claims_supported = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClaimsSupported() + { + return $this->claims_supported; + } + + /** + * Supported claims. + * + * Generated from protobuf field repeated string claims_supported = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClaimsSupported($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->claims_supported = $arr; + + return $this; + } + + /** + * Supported grant types. + * + * Generated from protobuf field repeated string grant_types = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGrantTypes() + { + return $this->grant_types; + } + + /** + * Supported grant types. + * + * Generated from protobuf field repeated string grant_types = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGrantTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->grant_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php new file mode 100644 index 000000000000..15d6eae15612 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php @@ -0,0 +1,129 @@ +google.cloud.gkemulticloud.v1.AzureProxyConfig + */ +class AzureProxyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The ARM ID the of the resource group containing proxy keyvault. + * Resource group ids are formatted as + * `/subscriptions//resourceGroups/`. + * + * Generated from protobuf field string resource_group_id = 1; + */ + protected $resource_group_id = ''; + /** + * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file + * Secret ids are formatted as + * `https://.vault.azure.net/secrets//`. + * + * Generated from protobuf field string secret_id = 2; + */ + protected $secret_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_group_id + * The ARM ID the of the resource group containing proxy keyvault. + * Resource group ids are formatted as + * `/subscriptions//resourceGroups/`. + * @type string $secret_id + * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file + * Secret ids are formatted as + * `https://.vault.azure.net/secrets//`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * The ARM ID the of the resource group containing proxy keyvault. + * Resource group ids are formatted as + * `/subscriptions//resourceGroups/`. + * + * Generated from protobuf field string resource_group_id = 1; + * @return string + */ + public function getResourceGroupId() + { + return $this->resource_group_id; + } + + /** + * The ARM ID the of the resource group containing proxy keyvault. + * Resource group ids are formatted as + * `/subscriptions//resourceGroups/`. + * + * Generated from protobuf field string resource_group_id = 1; + * @param string $var + * @return $this + */ + public function setResourceGroupId($var) + { + GPBUtil::checkString($var, True); + $this->resource_group_id = $var; + + return $this; + } + + /** + * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file + * Secret ids are formatted as + * `https://.vault.azure.net/secrets//`. + * + * Generated from protobuf field string secret_id = 2; + * @return string + */ + public function getSecretId() + { + return $this->secret_id; + } + + /** + * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file + * Secret ids are formatted as + * `https://.vault.azure.net/secrets//`. + * + * Generated from protobuf field string secret_id = 2; + * @param string $var + * @return $this + */ + public function setSecretId($var) + { + GPBUtil::checkString($var, True); + $this->secret_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php new file mode 100644 index 000000000000..b16a42166e59 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php @@ -0,0 +1,164 @@ +google.cloud.gkemulticloud.v1.AzureServerConfig + */ +class AzureServerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The `AzureServerConfig` resource name. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + private $valid_versions; + /** + * The list of supported Azure regions. + * + * Generated from protobuf field repeated string supported_azure_regions = 3; + */ + private $supported_azure_regions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The `AzureServerConfig` resource name. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_azure_regions + * The list of supported Azure regions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * The `AzureServerConfig` resource name. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The `AzureServerConfig` resource name. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidVersions() + { + return $this->valid_versions; + } + + /** + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo::class); + $this->valid_versions = $arr; + + return $this; + } + + /** + * The list of supported Azure regions. + * + * Generated from protobuf field repeated string supported_azure_regions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedAzureRegions() + { + return $this->supported_azure_regions; + } + + /** + * The list of supported Azure regions. + * + * Generated from protobuf field repeated string supported_azure_regions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedAzureRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_azure_regions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php new file mode 100644 index 000000000000..b5a17552ed8f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php @@ -0,0 +1,101 @@ +google.cloud.gkemulticloud.v1.AzureServicesAuthentication + */ +class AzureServicesAuthentication extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Azure Active Directory Tenant ID. + * + * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant_id = ''; + /** + * Required. The Azure Active Directory Application ID. + * + * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $application_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tenant_id + * Required. The Azure Active Directory Tenant ID. + * @type string $application_id + * Required. The Azure Active Directory Application ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Azure Active Directory Tenant ID. + * + * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTenantId() + { + return $this->tenant_id; + } + + /** + * Required. The Azure Active Directory Tenant ID. + * + * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTenantId($var) + { + GPBUtil::checkString($var, True); + $this->tenant_id = $var; + + return $this; + } + + /** + * Required. The Azure Active Directory Application ID. + * + * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getApplicationId() + { + return $this->application_id; + } + + /** + * Required. The Azure Active Directory Application ID. + * + * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setApplicationId($var) + { + GPBUtil::checkString($var, True); + $this->application_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php new file mode 100644 index 000000000000..1327e9f14c97 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php @@ -0,0 +1,75 @@ +google.cloud.gkemulticloud.v1.AzureSshConfig + */ +class AzureSshConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * + * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorized_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $authorized_key + * Required. The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * + * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAuthorizedKey() + { + return $this->authorized_key; + } + + /** + * Required. The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * + * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAuthorizedKey($var) + { + GPBUtil::checkString($var, True); + $this->authorized_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php new file mode 100644 index 000000000000..9272bbf1053d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php @@ -0,0 +1,71 @@ +google.cloud.gkemulticloud.v1.BinaryAuthorization + */ +class BinaryAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * Mode of operation for binauthz policy evaluation. If unspecified, defaults + * to DISABLED. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; + */ + protected $evaluation_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $evaluation_mode + * Mode of operation for binauthz policy evaluation. If unspecified, defaults + * to DISABLED. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Mode of operation for binauthz policy evaluation. If unspecified, defaults + * to DISABLED. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; + * @return int + */ + public function getEvaluationMode() + { + return $this->evaluation_mode; + } + + /** + * Mode of operation for binauthz policy evaluation. If unspecified, defaults + * to DISABLED. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; + * @param int $var + * @return $this + */ + public function setEvaluationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization\EvaluationMode::class); + $this->evaluation_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php new file mode 100644 index 000000000000..72c8aa9234c5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php @@ -0,0 +1,65 @@ +google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode + */ +class EvaluationMode +{ + /** + * Default value + * + * Generated from protobuf enum EVALUATION_MODE_UNSPECIFIED = 0; + */ + const EVALUATION_MODE_UNSPECIFIED = 0; + /** + * Disable BinaryAuthorization + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Enforce Kubernetes admission requests with BinaryAuthorization using the + * project's singleton policy. + * + * Generated from protobuf enum PROJECT_SINGLETON_POLICY_ENFORCE = 2; + */ + const PROJECT_SINGLETON_POLICY_ENFORCE = 2; + + private static $valueToName = [ + self::EVALUATION_MODE_UNSPECIFIED => 'EVALUATION_MODE_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::PROJECT_SINGLETON_POLICY_ENFORCE => 'PROJECT_SINGLETON_POLICY_ENFORCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EvaluationMode::class, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization_EvaluationMode::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php new file mode 100644 index 000000000000..80fed129c9ca --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php @@ -0,0 +1,261 @@ +google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest + */ +class CreateAttachedClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attached_cluster = null; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attached_cluster_id = ''; + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * @return \Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster, string $attachedClusterId): self + { + return (new self()) + ->setParent($parent) + ->setAttachedCluster($attachedCluster) + ->setAttachedClusterId($attachedClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attached_cluster + * Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * @type string $attached_cluster_id + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @type bool $validate_only + * If set, only validate the request, but do not actually create the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster|null + */ + public function getAttachedCluster() + { + return $this->attached_cluster; + } + + public function hasAttachedCluster() + { + return isset($this->attached_cluster); + } + + public function clearAttachedCluster() + { + unset($this->attached_cluster); + } + + /** + * Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $var + * @return $this + */ + public function setAttachedCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); + $this->attached_cluster = $var; + + return $this; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAttachedClusterId() + { + return $this->attached_cluster_id; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAttachedClusterId($var) + { + GPBUtil::checkString($var, True); + $this->attached_cluster_id = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php new file mode 100644 index 000000000000..2421c4f73fba --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php @@ -0,0 +1,261 @@ +google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + */ +class CreateAwsClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_cluster = null; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_cluster_id = ''; + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * @return \Google\Cloud\GkeMultiCloud\V1\CreateAwsClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster, string $awsClusterId): self + { + return (new self()) + ->setParent($parent) + ->setAwsCluster($awsCluster) + ->setAwsClusterId($awsClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsCluster $aws_cluster + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * @type string $aws_cluster_id + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @type bool $validate_only + * If set, only validate the request, but do not actually create the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null + */ + public function getAwsCluster() + { + return $this->aws_cluster; + } + + public function hasAwsCluster() + { + return isset($this->aws_cluster); + } + + public function clearAwsCluster() + { + unset($this->aws_cluster); + } + + /** + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var + * @return $this + */ + public function setAwsCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); + $this->aws_cluster = $var; + + return $this; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAwsClusterId() + { + return $this->aws_cluster_id; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAwsClusterId($var) + { + GPBUtil::checkString($var, True); + $this->aws_cluster_id = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php new file mode 100644 index 000000000000..0a50ccd7b646 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php @@ -0,0 +1,265 @@ +google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + */ +class CreateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_node_pool = null; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_node_pool_id = ''; + /** + * If set, only validate the request, but do not actually create the node + * pool. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * @return \Google\Cloud\GkeMultiCloud\V1\CreateAwsNodePoolRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool, string $awsNodePoolId): self + { + return (new self()) + ->setParent($parent) + ->setAwsNodePool($awsNodePool) + ->setAwsNodePoolId($awsNodePoolId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $aws_node_pool + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * @type string $aws_node_pool_id + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @type bool $validate_only + * If set, only validate the request, but do not actually create the node + * pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool|null + */ + public function getAwsNodePool() + { + return $this->aws_node_pool; + } + + public function hasAwsNodePool() + { + return isset($this->aws_node_pool); + } + + public function clearAwsNodePool() + { + unset($this->aws_node_pool); + } + + /** + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $var + * @return $this + */ + public function setAwsNodePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); + $this->aws_node_pool = $var; + + return $this; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAwsNodePoolId() + { + return $this->aws_node_pool_id; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAwsNodePoolId($var) + { + GPBUtil::checkString($var, True); + $this->aws_node_pool_id = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually create the node + * pool. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually create the node + * pool. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php new file mode 100644 index 000000000000..79ffc0e05dc3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php @@ -0,0 +1,261 @@ +google.cloud.gkemulticloud.v1.CreateAzureClientRequest + */ +class CreateAzureClientRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_client = null; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_client_id = ''; + /** + * If set, only validate the request, but do not actually create the client. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $azureClient Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureClientRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureClient $azureClient, string $azureClientId): self + { + return (new self()) + ->setParent($parent) + ->setAzureClient($azureClient) + ->setAzureClientId($azureClientId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureClient $azure_client + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * @type string $azure_client_id + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @type bool $validate_only + * If set, only validate the request, but do not actually create the client. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureClient|null + */ + public function getAzureClient() + { + return $this->azure_client; + } + + public function hasAzureClient() + { + return isset($this->azure_client); + } + + public function clearAzureClient() + { + unset($this->azure_client); + } + + /** + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $var + * @return $this + */ + public function setAzureClient($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClient::class); + $this->azure_client = $var; + + return $this; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAzureClientId() + { + return $this->azure_client_id; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAzureClientId($var) + { + GPBUtil::checkString($var, True); + $this->azure_client_id = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually create the client. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually create the client. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php new file mode 100644 index 000000000000..4a91100acf58 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php @@ -0,0 +1,261 @@ +google.cloud.gkemulticloud.v1.CreateAzureClusterRequest + */ +class CreateAzureClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_cluster = null; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_cluster_id = ''; + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster, string $azureClusterId): self + { + return (new self()) + ->setParent($parent) + ->setAzureCluster($azureCluster) + ->setAzureClusterId($azureClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azure_cluster + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * @type string $azure_cluster_id + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @type bool $validate_only + * If set, only validate the request, but do not actually create the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null + */ + public function getAzureCluster() + { + return $this->azure_cluster; + } + + public function hasAzureCluster() + { + return isset($this->azure_cluster); + } + + public function clearAzureCluster() + { + unset($this->azure_cluster); + } + + /** + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var + * @return $this + */ + public function setAzureCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); + $this->azure_cluster = $var; + + return $this; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAzureClusterId() + { + return $this->azure_cluster_id; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAzureClusterId($var) + { + GPBUtil::checkString($var, True); + $this->azure_cluster_id = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php new file mode 100644 index 000000000000..916c7caa6c2a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php @@ -0,0 +1,265 @@ +google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest + */ +class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_node_pool = null; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_node_pool_id = ''; + /** + * If set, only validate the request, but do not actually create the node + * pool. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureNodePoolRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool, string $azureNodePoolId): self + { + return (new self()) + ->setParent($parent) + ->setAzureNodePool($azureNodePool) + ->setAzureNodePoolId($azureNodePoolId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * @type string $azure_node_pool_id + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @type bool $validate_only + * If set, only validate the request, but do not actually create the node + * pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool|null + */ + public function getAzureNodePool() + { + return $this->azure_node_pool; + } + + public function hasAzureNodePool() + { + return isset($this->azure_node_pool); + } + + public function clearAzureNodePool() + { + unset($this->azure_node_pool); + } + + /** + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $var + * @return $this + */ + public function setAzureNodePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); + $this->azure_node_pool = $var; + + return $this; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAzureNodePoolId() + { + return $this->azure_node_pool_id; + } + + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAzureNodePoolId($var) + { + GPBUtil::checkString($var, True); + $this->azure_node_pool_id = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually create the node + * pool. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually create the node + * pool. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php new file mode 100644 index 000000000000..0d3c5f6c7d10 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php @@ -0,0 +1,292 @@ +google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + */ +class DeleteAttachedClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * If set to true, and the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + /** + * If set to true, the deletion of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5; + */ + protected $ignore_errors = false; + /** + * The current etag of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type bool $validate_only + * If set, only validate the request, but do not actually delete the resource. + * @type bool $allow_missing + * If set to true, and the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * @type bool $ignore_errors + * If set to true, the deletion of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * @type string $etag + * The current etag of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * If set to true, and the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * If set to true, the deletion of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5; + * @return bool + */ + public function getIgnoreErrors() + { + return $this->ignore_errors; + } + + /** + * If set to true, the deletion of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5; + * @param bool $var + * @return $this + */ + public function setIgnoreErrors($var) + { + GPBUtil::checkBool($var); + $this->ignore_errors = $var; + + return $this; + } + + /** + * The current etag of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current etag of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php new file mode 100644 index 000000000000..af66bc8b136a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php @@ -0,0 +1,288 @@ +google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + */ +class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + /** + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_errors = false; + /** + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAwsClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type bool $validate_only + * If set, only validate the request, but do not actually delete the resource. + * @type bool $allow_missing + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * @type bool $ignore_errors + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * @type string $etag + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreErrors() + { + return $this->ignore_errors; + } + + /** + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreErrors($var) + { + GPBUtil::checkBool($var); + $this->ignore_errors = $var; + + return $this; + } + + /** + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php new file mode 100644 index 000000000000..c4c621f59cdc --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php @@ -0,0 +1,292 @@ +google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + */ +class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set, only validate the request, but do not actually delete the node + * pool. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + /** + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_errors = false; + /** + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAwsNodePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type bool $validate_only + * If set, only validate the request, but do not actually delete the node + * pool. + * @type bool $allow_missing + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * @type bool $ignore_errors + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * @type string $etag + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually delete the node + * pool. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually delete the node + * pool. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreErrors() + { + return $this->ignore_errors; + } + + /** + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreErrors($var) + { + GPBUtil::checkBool($var); + $this->ignore_errors = $var; + + return $this; + } + + /** + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php new file mode 100644 index 000000000000..37807fa3dee7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php @@ -0,0 +1,197 @@ +google.cloud.gkemulticloud.v1.DeleteAzureClientRequest + */ +class DeleteAzureClientRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + + /** + * @param string $name Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClientName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureClientRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type bool $allow_missing + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * @type bool $validate_only + * If set, only validate the request, but do not actually delete the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php new file mode 100644 index 000000000000..e7da64a454bf --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php @@ -0,0 +1,242 @@ +google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest + */ +class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + /** + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type bool $allow_missing + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * @type bool $validate_only + * If set, only validate the request, but do not actually delete the resource. + * @type string $etag + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php new file mode 100644 index 000000000000..7855a4ee941d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php @@ -0,0 +1,250 @@ +google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest + */ +class DeleteAzureNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set, only validate the request, but do not actually delete the node + * pool. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + /** + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureNodePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type bool $validate_only + * If set, only validate the request, but do not actually delete the node + * pool. + * @type bool $allow_missing + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * @type string $etag + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually delete the node + * pool. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually delete the node + * pool. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * Useful for idempotent deletion. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php new file mode 100644 index 000000000000..ddc8d53d7ae1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php @@ -0,0 +1,131 @@ +google.cloud.gkemulticloud.v1.Fleet + */ +class Fleet extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Fleet host project where this cluster will be + * registered. + * Project names are formatted as + * `projects/`. + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. + * Membership names are formatted as + * `projects//locations/global/membership/`. + * + * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $membership = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Required. The name of the Fleet host project where this cluster will be + * registered. + * Project names are formatted as + * `projects/`. + * @type string $membership + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. + * Membership names are formatted as + * `projects//locations/global/membership/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Fleet host project where this cluster will be + * registered. + * Project names are formatted as + * `projects/`. + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The name of the Fleet host project where this cluster will be + * registered. + * Project names are formatted as + * `projects/`. + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. + * Membership names are formatted as + * `projects//locations/global/membership/`. + * + * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMembership() + { + return $this->membership; + } + + /** + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. + * Membership names are formatted as + * `projects//locations/global/membership/`. + * + * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkString($var, True); + $this->membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php new file mode 100644 index 000000000000..121afc3898f2 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php @@ -0,0 +1,337 @@ +google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequest + */ +class GenerateAttachedClusterAgentTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. + * + * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $attached_cluster = ''; + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subject_token = ''; + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subject_token_type = ''; + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $grant_type = ''; + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $audience = ''; + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scope = ''; + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $requested_token_type = ''; + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $options = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attached_cluster + * Required. + * @type string $subject_token + * Required. + * @type string $subject_token_type + * Required. + * @type string $version + * Required. + * @type string $grant_type + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requested_token_type + * Optional. + * @type string $options + * Optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. + * + * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAttachedCluster() + { + return $this->attached_cluster; + } + + /** + * Required. + * + * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAttachedCluster($var) + { + GPBUtil::checkString($var, True); + $this->attached_cluster = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubjectToken() + { + return $this->subject_token; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubjectToken($var) + { + GPBUtil::checkString($var, True); + $this->subject_token = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubjectTokenType() + { + return $this->subject_token_type; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubjectTokenType($var) + { + GPBUtil::checkString($var, True); + $this->subject_token_type = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGrantType() + { + return $this->grant_type; + } + + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGrantType($var) + { + GPBUtil::checkString($var, True); + $this->grant_type = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestedTokenType() + { + return $this->requested_token_type; + } + + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestedTokenType($var) + { + GPBUtil::checkString($var, True); + $this->requested_token_type = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkString($var, True); + $this->options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php new file mode 100644 index 000000000000..913a5f2ab892 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php @@ -0,0 +1,112 @@ +google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenResponse + */ +class GenerateAttachedClusterAgentTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string access_token = 1; + */ + protected $access_token = ''; + /** + * Generated from protobuf field int32 expires_in = 2; + */ + protected $expires_in = 0; + /** + * Generated from protobuf field string token_type = 3; + */ + protected $token_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_token + * @type int $expires_in + * @type string $token_type + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string access_token = 1; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Generated from protobuf field string access_token = 1; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 expires_in = 2; + * @return int + */ + public function getExpiresIn() + { + return $this->expires_in; + } + + /** + * Generated from protobuf field int32 expires_in = 2; + * @param int $var + * @return $this + */ + public function setExpiresIn($var) + { + GPBUtil::checkInt32($var); + $this->expires_in = $var; + + return $this; + } + + /** + * Generated from protobuf field string token_type = 3; + * @return string + */ + public function getTokenType() + { + return $this->token_type; + } + + /** + * Generated from protobuf field string token_type = 3; + * @param string $var + * @return $this + */ + public function setTokenType($var) + { + GPBUtil::checkString($var, True); + $this->token_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php new file mode 100644 index 000000000000..b3000ce01b1b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php @@ -0,0 +1,289 @@ +google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest + */ +class GenerateAttachedClusterInstallManifestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A client provided ID of the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as + * `projects//locations//memberships/`. + * + * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attached_cluster_id = ''; + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $platform_version = ''; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + + /** + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param string $attachedClusterId Required. A client provided ID of the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as + * `projects//locations//memberships/`. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest + * + * @experimental + */ + public static function build(string $parent, string $attachedClusterId): self + { + return (new self()) + ->setParent($parent) + ->setAttachedClusterId($attachedClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type string $attached_cluster_id + * Required. A client provided ID of the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as + * `projects//locations//memberships/`. + * @type string $platform_version + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A client provided ID of the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as + * `projects//locations//memberships/`. + * + * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAttachedClusterId() + { + return $this->attached_cluster_id; + } + + /** + * Required. A client provided ID of the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as + * `projects//locations//memberships/`. + * + * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAttachedClusterId($var) + { + GPBUtil::checkString($var, True); + $this->attached_cluster_id = $var; + + return $this; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlatformVersion() + { + return $this->platform_version; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlatformVersion($var) + { + GPBUtil::checkString($var, True); + $this->platform_version = $var; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php new file mode 100644 index 000000000000..558f3fe1e5d2 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php @@ -0,0 +1,72 @@ +google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse + */ +class GenerateAttachedClusterInstallManifestResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A set of Kubernetes resources (in YAML format) to be applied + * to the cluster to be attached. + * + * Generated from protobuf field string manifest = 1; + */ + protected $manifest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $manifest + * A set of Kubernetes resources (in YAML format) to be applied + * to the cluster to be attached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * A set of Kubernetes resources (in YAML format) to be applied + * to the cluster to be attached. + * + * Generated from protobuf field string manifest = 1; + * @return string + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * A set of Kubernetes resources (in YAML format) to be applied + * to the cluster to be attached. + * + * Generated from protobuf field string manifest = 1; + * @param string $var + * @return $this + */ + public function setManifest($var) + { + GPBUtil::checkString($var, True); + $this->manifest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php new file mode 100644 index 000000000000..d3d109e81257 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php @@ -0,0 +1,91 @@ +google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + */ +class GenerateAwsAccessTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $aws_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $aws_cluster + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAwsCluster() + { + return $this->aws_cluster; + } + + /** + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAwsCluster($var) + { + GPBUtil::checkString($var, True); + $this->aws_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php new file mode 100644 index 000000000000..35f1695ffc34 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php @@ -0,0 +1,111 @@ +google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + */ +class GenerateAwsAccessTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Access token to authenticate to k8s api-server. + * + * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $access_token = ''; + /** + * Output only. Timestamp at which the token will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_token + * Output only. Access token to authenticate to k8s api-server. + * @type \Google\Protobuf\Timestamp $expiration_time + * Output only. Timestamp at which the token will expire. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Access token to authenticate to k8s api-server. + * + * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Output only. Access token to authenticate to k8s api-server. + * + * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Output only. Timestamp at which the token will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * Output only. Timestamp at which the token will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php new file mode 100644 index 000000000000..16461659a451 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php @@ -0,0 +1,371 @@ +google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequest + */ +class GenerateAwsClusterAgentTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $aws_cluster = ''; + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subject_token = ''; + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subject_token_type = ''; + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Optional. + * + * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_pool_id = ''; + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $grant_type = ''; + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $audience = ''; + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scope = ''; + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $requested_token_type = ''; + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $options = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $aws_cluster + * Required. + * @type string $subject_token + * Required. + * @type string $subject_token_type + * Required. + * @type string $version + * Required. + * @type string $node_pool_id + * Optional. + * @type string $grant_type + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requested_token_type + * Optional. + * @type string $options + * Optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAwsCluster() + { + return $this->aws_cluster; + } + + /** + * Required. + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAwsCluster($var) + { + GPBUtil::checkString($var, True); + $this->aws_cluster = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubjectToken() + { + return $this->subject_token; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubjectToken($var) + { + GPBUtil::checkString($var, True); + $this->subject_token = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubjectTokenType() + { + return $this->subject_token_type; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubjectTokenType($var) + { + GPBUtil::checkString($var, True); + $this->subject_token_type = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNodePoolId() + { + return $this->node_pool_id; + } + + /** + * Optional. + * + * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNodePoolId($var) + { + GPBUtil::checkString($var, True); + $this->node_pool_id = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGrantType() + { + return $this->grant_type; + } + + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGrantType($var) + { + GPBUtil::checkString($var, True); + $this->grant_type = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestedTokenType() + { + return $this->requested_token_type; + } + + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestedTokenType($var) + { + GPBUtil::checkString($var, True); + $this->requested_token_type = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkString($var, True); + $this->options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php new file mode 100644 index 000000000000..0a5d0bafb1b3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php @@ -0,0 +1,112 @@ +google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenResponse + */ +class GenerateAwsClusterAgentTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string access_token = 1; + */ + protected $access_token = ''; + /** + * Generated from protobuf field int32 expires_in = 2; + */ + protected $expires_in = 0; + /** + * Generated from protobuf field string token_type = 3; + */ + protected $token_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_token + * @type int $expires_in + * @type string $token_type + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string access_token = 1; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Generated from protobuf field string access_token = 1; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 expires_in = 2; + * @return int + */ + public function getExpiresIn() + { + return $this->expires_in; + } + + /** + * Generated from protobuf field int32 expires_in = 2; + * @param int $var + * @return $this + */ + public function setExpiresIn($var) + { + GPBUtil::checkInt32($var); + $this->expires_in = $var; + + return $this; + } + + /** + * Generated from protobuf field string token_type = 3; + * @return string + */ + public function getTokenType() + { + return $this->token_type; + } + + /** + * Generated from protobuf field string token_type = 3; + * @param string $var + * @return $this + */ + public function setTokenType($var) + { + GPBUtil::checkString($var, True); + $this->token_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php new file mode 100644 index 000000000000..f189dbc3a504 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php @@ -0,0 +1,91 @@ +google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + */ +class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $azure_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $azure_cluster + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAzureCluster() + { + return $this->azure_cluster; + } + + /** + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAzureCluster($var) + { + GPBUtil::checkString($var, True); + $this->azure_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php new file mode 100644 index 000000000000..4371394919c5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php @@ -0,0 +1,111 @@ +google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + */ +class GenerateAzureAccessTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Access token to authenticate to k8s api-server. + * + * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $access_token = ''; + /** + * Output only. Timestamp at which the token will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_token + * Output only. Access token to authenticate to k8s api-server. + * @type \Google\Protobuf\Timestamp $expiration_time + * Output only. Timestamp at which the token will expire. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Access token to authenticate to k8s api-server. + * + * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Output only. Access token to authenticate to k8s api-server. + * + * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Output only. Timestamp at which the token will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * Output only. Timestamp at which the token will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php new file mode 100644 index 000000000000..d19114785203 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php @@ -0,0 +1,371 @@ +google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequest + */ +class GenerateAzureClusterAgentTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $azure_cluster = ''; + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subject_token = ''; + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subject_token_type = ''; + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = ''; + /** + * Optional. + * + * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_pool_id = ''; + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $grant_type = ''; + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $audience = ''; + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scope = ''; + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $requested_token_type = ''; + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $options = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $azure_cluster + * Required. + * @type string $subject_token + * Required. + * @type string $subject_token_type + * Required. + * @type string $version + * Required. + * @type string $node_pool_id + * Optional. + * @type string $grant_type + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requested_token_type + * Optional. + * @type string $options + * Optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAzureCluster() + { + return $this->azure_cluster; + } + + /** + * Required. + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAzureCluster($var) + { + GPBUtil::checkString($var, True); + $this->azure_cluster = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubjectToken() + { + return $this->subject_token; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubjectToken($var) + { + GPBUtil::checkString($var, True); + $this->subject_token = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubjectTokenType() + { + return $this->subject_token_type; + } + + /** + * Required. + * + * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubjectTokenType($var) + { + GPBUtil::checkString($var, True); + $this->subject_token_type = $var; + + return $this; + } + + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNodePoolId() + { + return $this->node_pool_id; + } + + /** + * Optional. + * + * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNodePoolId($var) + { + GPBUtil::checkString($var, True); + $this->node_pool_id = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGrantType() + { + return $this->grant_type; + } + + /** + * Optional. + * + * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGrantType($var) + { + GPBUtil::checkString($var, True); + $this->grant_type = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Optional. + * + * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Optional. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestedTokenType() + { + return $this->requested_token_type; + } + + /** + * Optional. + * + * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestedTokenType($var) + { + GPBUtil::checkString($var, True); + $this->requested_token_type = $var; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. + * + * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkString($var, True); + $this->options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php new file mode 100644 index 000000000000..beb176c6239a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php @@ -0,0 +1,112 @@ +google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenResponse + */ +class GenerateAzureClusterAgentTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string access_token = 1; + */ + protected $access_token = ''; + /** + * Generated from protobuf field int32 expires_in = 2; + */ + protected $expires_in = 0; + /** + * Generated from protobuf field string token_type = 3; + */ + protected $token_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_token + * @type int $expires_in + * @type string $token_type + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string access_token = 1; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Generated from protobuf field string access_token = 1; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 expires_in = 2; + * @return int + */ + public function getExpiresIn() + { + return $this->expires_in; + } + + /** + * Generated from protobuf field int32 expires_in = 2; + * @param int $var + * @return $this + */ + public function setExpiresIn($var) + { + GPBUtil::checkInt32($var); + $this->expires_in = $var; + + return $this; + } + + /** + * Generated from protobuf field string token_type = 3; + * @return string + */ + public function getTokenType() + { + return $this->token_type; + } + + /** + * Generated from protobuf field string token_type = 3; + * @param string $var + * @return $this + */ + public function setTokenType($var) + { + GPBUtil::checkString($var, True); + $this->token_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php new file mode 100644 index 000000000000..b5da37d6fa0a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAttachedClusterRequest + */ +class GetAttachedClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php new file mode 100644 index 000000000000..f2ed61ae77c5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php @@ -0,0 +1,114 @@ +google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + */ +class GetAttachedServerConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAttachedServerConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php new file mode 100644 index 000000000000..1a522d11bbb5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAwsClusterRequest + */ +class GetAwsClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php new file mode 100644 index 000000000000..7e334e021db1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php @@ -0,0 +1,78 @@ +google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest + */ +class GetAwsJsonWebKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The AwsCluster, which owns the JsonWebKeys. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $aws_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $aws_cluster + * Required. The AwsCluster, which owns the JsonWebKeys. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The AwsCluster, which owns the JsonWebKeys. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAwsCluster() + { + return $this->aws_cluster; + } + + /** + * Required. The AwsCluster, which owns the JsonWebKeys. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAwsCluster($var) + { + GPBUtil::checkString($var, True); + $this->aws_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php new file mode 100644 index 000000000000..549d270d9f3e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + */ +class GetAwsNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php new file mode 100644 index 000000000000..e1e5b395ff9f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php @@ -0,0 +1,76 @@ +google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest + */ +class GetAwsOpenIdConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The AwsCluster, which owns the OIDC discovery document. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $aws_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $aws_cluster + * Required. The AwsCluster, which owns the OIDC discovery document. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The AwsCluster, which owns the OIDC discovery document. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAwsCluster() + { + return $this->aws_cluster; + } + + /** + * Required. The AwsCluster, which owns the OIDC discovery document. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * + * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAwsCluster($var) + { + GPBUtil::checkString($var, True); + $this->aws_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php new file mode 100644 index 000000000000..fe925dd0cc05 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + */ +class GetAwsServerConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. + * + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsServerConfigName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsServerConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php new file mode 100644 index 000000000000..ce520b46f6bd --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php @@ -0,0 +1,118 @@ +google.cloud.gkemulticloud.v1.GetAzureClientRequest + */ +class GetAzureClientRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClientName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php new file mode 100644 index 000000000000..c0403c71bf54 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAzureClusterRequest + */ +class GetAzureClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php new file mode 100644 index 000000000000..b4613f999d14 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php @@ -0,0 +1,94 @@ +google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest + */ +class GetAzureJsonWebKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $azure_cluster = ''; + + /** + * @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureJsonWebKeysRequest + * + * @experimental + */ + public static function build(string $azureCluster): self + { + return (new self()) + ->setAzureCluster($azureCluster); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $azure_cluster + * Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAzureCluster() + { + return $this->azure_cluster; + } + + /** + * Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAzureCluster($var) + { + GPBUtil::checkString($var, True); + $this->azure_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php new file mode 100644 index 000000000000..d491eade7bca --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest + */ +class GetAzureNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. + * + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php new file mode 100644 index 000000000000..bb7336cfb5ff --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php @@ -0,0 +1,92 @@ +google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest + */ +class GetAzureOpenIdConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $azure_cluster = ''; + + /** + * @param string $azureCluster Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureOpenIdConfigRequest + * + * @experimental + */ + public static function build(string $azureCluster): self + { + return (new self()) + ->setAzureCluster($azureCluster); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $azure_cluster + * Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAzureCluster() + { + return $this->azure_cluster; + } + + /** + * Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * + * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAzureCluster($var) + { + GPBUtil::checkString($var, True); + $this->azure_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php new file mode 100644 index 000000000000..933aca070c01 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest + */ +class GetAzureServerConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. + * + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureServerConfigName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureServerConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php new file mode 100644 index 000000000000..2402fd36bcbb --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php @@ -0,0 +1,306 @@ +google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest + */ +class ImportAttachedClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * If set, only validate the request, but do not actually import the cluster. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Required. The name of the fleet membership resource to import. + * + * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet_membership = ''; + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $platform_version = ''; + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $distribution = ''; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy_config = null; + + /** + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param string $fleetMembership Required. The name of the fleet membership resource to import. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ImportAttachedClusterRequest + * + * @experimental + */ + public static function build(string $parent, string $fleetMembership): self + { + return (new self()) + ->setParent($parent) + ->setFleetMembership($fleetMembership); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type bool $validate_only + * If set, only validate the request, but do not actually import the cluster. + * @type string $fleet_membership + * Required. The name of the fleet membership resource to import. + * @type string $platform_version + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @type string $distribution + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually import the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually import the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. The name of the fleet membership resource to import. + * + * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFleetMembership() + { + return $this->fleet_membership; + } + + /** + * Required. The name of the fleet membership resource to import. + * + * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFleetMembership($var) + { + GPBUtil::checkString($var, True); + $this->fleet_membership = $var; + + return $this; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlatformVersion() + { + return $this->platform_version; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlatformVersion($var) + { + GPBUtil::checkString($var, True); + $this->platform_version = $var; + + return $this; + } + + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDistribution() + { + return $this->distribution; + } + + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDistribution($var) + { + GPBUtil::checkString($var, True); + $this->distribution = $var; + + return $this; + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php new file mode 100644 index 000000000000..b1c701bfc4c4 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php @@ -0,0 +1,339 @@ +google.cloud.gkemulticloud.v1.Jwk + */ +class Jwk extends \Google\Protobuf\Internal\Message +{ + /** + * Key Type. + * + * Generated from protobuf field string kty = 1; + */ + protected $kty = ''; + /** + * Algorithm. + * + * Generated from protobuf field string alg = 2; + */ + protected $alg = ''; + /** + * Permitted uses for the public keys. + * + * Generated from protobuf field string use = 3; + */ + protected $use = ''; + /** + * Key ID. + * + * Generated from protobuf field string kid = 4; + */ + protected $kid = ''; + /** + * Used for RSA keys. + * + * Generated from protobuf field string n = 5; + */ + protected $n = ''; + /** + * Used for RSA keys. + * + * Generated from protobuf field string e = 6; + */ + protected $e = ''; + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string x = 7; + */ + protected $x = ''; + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string y = 8; + */ + protected $y = ''; + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string crv = 9; + */ + protected $crv = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kty + * Key Type. + * @type string $alg + * Algorithm. + * @type string $use + * Permitted uses for the public keys. + * @type string $kid + * Key ID. + * @type string $n + * Used for RSA keys. + * @type string $e + * Used for RSA keys. + * @type string $x + * Used for ECDSA keys. + * @type string $y + * Used for ECDSA keys. + * @type string $crv + * Used for ECDSA keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Key Type. + * + * Generated from protobuf field string kty = 1; + * @return string + */ + public function getKty() + { + return $this->kty; + } + + /** + * Key Type. + * + * Generated from protobuf field string kty = 1; + * @param string $var + * @return $this + */ + public function setKty($var) + { + GPBUtil::checkString($var, True); + $this->kty = $var; + + return $this; + } + + /** + * Algorithm. + * + * Generated from protobuf field string alg = 2; + * @return string + */ + public function getAlg() + { + return $this->alg; + } + + /** + * Algorithm. + * + * Generated from protobuf field string alg = 2; + * @param string $var + * @return $this + */ + public function setAlg($var) + { + GPBUtil::checkString($var, True); + $this->alg = $var; + + return $this; + } + + /** + * Permitted uses for the public keys. + * + * Generated from protobuf field string use = 3; + * @return string + */ + public function getUse() + { + return $this->use; + } + + /** + * Permitted uses for the public keys. + * + * Generated from protobuf field string use = 3; + * @param string $var + * @return $this + */ + public function setUse($var) + { + GPBUtil::checkString($var, True); + $this->use = $var; + + return $this; + } + + /** + * Key ID. + * + * Generated from protobuf field string kid = 4; + * @return string + */ + public function getKid() + { + return $this->kid; + } + + /** + * Key ID. + * + * Generated from protobuf field string kid = 4; + * @param string $var + * @return $this + */ + public function setKid($var) + { + GPBUtil::checkString($var, True); + $this->kid = $var; + + return $this; + } + + /** + * Used for RSA keys. + * + * Generated from protobuf field string n = 5; + * @return string + */ + public function getN() + { + return $this->n; + } + + /** + * Used for RSA keys. + * + * Generated from protobuf field string n = 5; + * @param string $var + * @return $this + */ + public function setN($var) + { + GPBUtil::checkString($var, True); + $this->n = $var; + + return $this; + } + + /** + * Used for RSA keys. + * + * Generated from protobuf field string e = 6; + * @return string + */ + public function getE() + { + return $this->e; + } + + /** + * Used for RSA keys. + * + * Generated from protobuf field string e = 6; + * @param string $var + * @return $this + */ + public function setE($var) + { + GPBUtil::checkString($var, True); + $this->e = $var; + + return $this; + } + + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string x = 7; + * @return string + */ + public function getX() + { + return $this->x; + } + + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string x = 7; + * @param string $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkString($var, True); + $this->x = $var; + + return $this; + } + + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string y = 8; + * @return string + */ + public function getY() + { + return $this->y; + } + + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string y = 8; + * @param string $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkString($var, True); + $this->y = $var; + + return $this; + } + + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string crv = 9; + * @return string + */ + public function getCrv() + { + return $this->crv; + } + + /** + * Used for ECDSA keys. + * + * Generated from protobuf field string crv = 9; + * @param string $var + * @return $this + */ + public function setCrv($var) + { + GPBUtil::checkString($var, True); + $this->crv = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php new file mode 100644 index 000000000000..48dc2a01caff --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php @@ -0,0 +1,101 @@ +google.cloud.gkemulticloud.v1.KubernetesSecret + */ +class KubernetesSecret extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the kubernetes secret. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Namespace in which the kubernetes secret is stored. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the kubernetes secret. + * @type string $namespace + * Namespace in which the kubernetes secret is stored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the kubernetes secret. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the kubernetes secret. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Namespace in which the kubernetes secret is stored. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace in which the kubernetes secret is stored. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php new file mode 100644 index 000000000000..dbf9477b5b25 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php @@ -0,0 +1,199 @@ +google.cloud.gkemulticloud.v1.ListAttachedClustersRequest + */ +class ListAttachedClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous + * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `nextPageToken` value returned from a previous + * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] + * request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous + * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous + * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php new file mode 100644 index 000000000000..1252498f6346 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.ListAttachedClustersResponse + */ +class ListAttachedClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; + */ + private $attached_clusters; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedCluster>|\Google\Protobuf\Internal\RepeatedField $attached_clusters + * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources in the specified Google Cloud Platform project and region region. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachedClusters() + { + return $this->attached_clusters; + } + + /** + * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachedClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); + $this->attached_clusters = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php new file mode 100644 index 000000000000..cabd399a840b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php @@ -0,0 +1,199 @@ +google.cloud.gkemulticloud.v1.ListAwsClustersRequest + */ +class ListAwsClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AwsClustersClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `nextPageToken` value returned from a previous + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php new file mode 100644 index 000000000000..cf2c1a17dca9 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.ListAwsClustersResponse + */ +class ListAwsClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + private $aws_clusters; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsCluster>|\Google\Protobuf\Internal\RepeatedField $aws_clusters + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified Google Cloud Platform project and region region. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAwsClusters() + { + return $this->aws_clusters; + } + + /** + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAwsClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); + $this->aws_clusters = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php new file mode 100644 index 000000000000..ec512d71b6af --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php @@ -0,0 +1,204 @@ +google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + */ +class ListAwsNodePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `nextPageToken` value returned from a previous + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php new file mode 100644 index 000000000000..e6a681467d5a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + */ +class ListAwsNodePoolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + private $aws_node_pools; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePool>|\Google\Protobuf\Internal\RepeatedField $aws_node_pools + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAwsNodePools() + { + return $this->aws_node_pools; + } + + /** + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAwsNodePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); + $this->aws_node_pools = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php new file mode 100644 index 000000000000..721195797caf --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php @@ -0,0 +1,199 @@ +google.cloud.gkemulticloud.v1.ListAzureClientsRequest + */ +class ListAzureClientsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `nextPageToken` value returned from a previous + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php new file mode 100644 index 000000000000..6ec3fccc2c48 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.ListAzureClientsResponse + */ +class ListAzureClientsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources in the specified Google Cloud project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + private $azure_clients; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClient>|\Google\Protobuf\Internal\RepeatedField $azure_clients + * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources in the specified Google Cloud project and region region. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources in the specified Google Cloud project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAzureClients() + { + return $this->azure_clients; + } + + /** + * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources in the specified Google Cloud project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClient>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAzureClients($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClient::class); + $this->azure_clients = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php new file mode 100644 index 000000000000..c8d3b2bc6110 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php @@ -0,0 +1,199 @@ +google.cloud.gkemulticloud.v1.ListAzureClustersRequest + */ +class ListAzureClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `nextPageToken` value returned from a previous + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php new file mode 100644 index 000000000000..ed2af0dfa8b5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.ListAzureClustersResponse + */ +class ListAzureClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + private $azure_clusters; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureCluster>|\Google\Protobuf\Internal\RepeatedField $azure_clusters + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified Google Cloud Platform project and region region. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAzureClusters() + { + return $this->azure_clusters; + } + + /** + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified Google Cloud Platform project and region region. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAzureClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); + $this->azure_clusters = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php new file mode 100644 index 000000000000..4a48b8d5a27d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php @@ -0,0 +1,204 @@ +google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest + */ +class ListAzureNodePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `nextPageToken` value returned from a previous + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php new file mode 100644 index 000000000000..dba3b96d705d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse + */ +class ListAzureNodePoolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + private $azure_node_pools; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePool>|\Google\Protobuf\Internal\RepeatedField $azure_node_pools + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAzureNodePools() + { + return $this->azure_node_pools; + } + + /** + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAzureNodePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); + $this->azure_node_pools = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php new file mode 100644 index 000000000000..422fc56a7d5e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.LoggingComponentConfig + */ +class LoggingComponentConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The components to be enabled. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + */ + private $enable_components; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $enable_components + * The components to be enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * The components to be enabled. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnableComponents() + { + return $this->enable_components; + } + + /** + * The components to be enabled. + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnableComponents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig\Component::class); + $this->enable_components = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php new file mode 100644 index 000000000000..7bbb2b8b88ac --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php @@ -0,0 +1,64 @@ +google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component + */ +class Component +{ + /** + * No component is specified + * + * Generated from protobuf enum COMPONENT_UNSPECIFIED = 0; + */ + const COMPONENT_UNSPECIFIED = 0; + /** + * This indicates that system logging components is enabled. + * + * Generated from protobuf enum SYSTEM_COMPONENTS = 1; + */ + const SYSTEM_COMPONENTS = 1; + /** + * This indicates that user workload logging component is enabled. + * + * Generated from protobuf enum WORKLOADS = 2; + */ + const WORKLOADS = 2; + + private static $valueToName = [ + self::COMPONENT_UNSPECIFIED => 'COMPONENT_UNSPECIFIED', + self::SYSTEM_COMPONENTS => 'SYSTEM_COMPONENTS', + self::WORKLOADS => 'WORKLOADS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Component::class, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig_Component::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php new file mode 100644 index 000000000000..85b0a7595ebf --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php @@ -0,0 +1,77 @@ +google.cloud.gkemulticloud.v1.LoggingConfig + */ +class LoggingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The configuration of the logging components; + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + protected $component_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig $component_config + * The configuration of the logging components; + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * The configuration of the logging components; + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * @return \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig|null + */ + public function getComponentConfig() + { + return $this->component_config; + } + + public function hasComponentConfig() + { + return isset($this->component_config); + } + + public function clearComponentConfig() + { + unset($this->component_config); + } + + /** + * The configuration of the logging components; + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * @param \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig $var + * @return $this + */ + public function setComponentConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig::class); + $this->component_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php new file mode 100644 index 000000000000..c3f7e469972b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php @@ -0,0 +1,68 @@ +google.cloud.gkemulticloud.v1.ManagedPrometheusConfig + */ +class ManagedPrometheusConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Enable Managed Collection. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Enable Managed Collection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Enable Managed Collection. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enable Managed Collection. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php new file mode 100644 index 000000000000..abbd020c984a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.MaxPodsConstraint + */ +class MaxPodsConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The maximum number of pods to schedule on a single node. + * + * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_pods_per_node = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_pods_per_node + * Required. The maximum number of pods to schedule on a single node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The maximum number of pods to schedule on a single node. + * + * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getMaxPodsPerNode() + { + return $this->max_pods_per_node; + } + + /** + * Required. The maximum number of pods to schedule on a single node. + * + * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setMaxPodsPerNode($var) + { + GPBUtil::checkInt64($var); + $this->max_pods_per_node = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php new file mode 100644 index 000000000000..a6b9a2e0a799 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php @@ -0,0 +1,77 @@ +google.cloud.gkemulticloud.v1.MonitoringConfig + */ +class MonitoringConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; + */ + protected $managed_prometheus_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $managed_prometheus_config + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; + * @return \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig|null + */ + public function getManagedPrometheusConfig() + { + return $this->managed_prometheus_config; + } + + public function hasManagedPrometheusConfig() + { + return isset($this->managed_prometheus_config); + } + + public function clearManagedPrometheusConfig() + { + unset($this->managed_prometheus_config); + } + + /** + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; + * @param \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $var + * @return $this + */ + public function setManagedPrometheusConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig::class); + $this->managed_prometheus_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php new file mode 100644 index 000000000000..3008c9dd75ef --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php @@ -0,0 +1,135 @@ +google.cloud.gkemulticloud.v1.NodeTaint + */ +class NodeTaint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Key for the taint. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * Required. Value for the taint. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + /** + * Required. The taint effect. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $effect = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Required. Key for the taint. + * @type string $value + * Required. Value for the taint. + * @type int $effect + * Required. The taint effect. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Key for the taint. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. Key for the taint. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Required. Value for the taint. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. Value for the taint. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Required. The taint effect. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEffect() + { + return $this->effect; + } + + /** + * Required. The taint effect. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEffect($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\NodeTaint\Effect::class); + $this->effect = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php new file mode 100644 index 000000000000..e91ecf54c3c1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php @@ -0,0 +1,77 @@ +google.cloud.gkemulticloud.v1.NodeTaint.Effect + */ +class Effect +{ + /** + * Not set. + * + * Generated from protobuf enum EFFECT_UNSPECIFIED = 0; + */ + const EFFECT_UNSPECIFIED = 0; + /** + * Do not allow new pods to schedule onto the node unless they tolerate the + * taint, but allow all pods submitted to Kubelet without going through the + * scheduler to start, and allow all already-running pods to continue + * running. Enforced by the scheduler. + * + * Generated from protobuf enum NO_SCHEDULE = 1; + */ + const NO_SCHEDULE = 1; + /** + * Like TaintEffectNoSchedule, but the scheduler tries not to schedule + * new pods onto the node, rather than prohibiting new pods from scheduling + * onto the node entirely. Enforced by the scheduler. + * + * Generated from protobuf enum PREFER_NO_SCHEDULE = 2; + */ + const PREFER_NO_SCHEDULE = 2; + /** + * Evict any already-running pods that do not tolerate the taint. + * Currently enforced by NodeController. + * + * Generated from protobuf enum NO_EXECUTE = 3; + */ + const NO_EXECUTE = 3; + + private static $valueToName = [ + self::EFFECT_UNSPECIFIED => 'EFFECT_UNSPECIFIED', + self::NO_SCHEDULE => 'NO_SCHEDULE', + self::PREFER_NO_SCHEDULE => 'PREFER_NO_SCHEDULE', + self::NO_EXECUTE => 'NO_EXECUTE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Effect::class, \Google\Cloud\GkeMultiCloud\V1\NodeTaint_Effect::class); + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php new file mode 100644 index 000000000000..da707c71cf06 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php @@ -0,0 +1,315 @@ +google.cloud.gkemulticloud.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time at which this operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which this operation was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The name of the resource associated to this operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_detail = ''; + /** + * Output only. Human-readable status of any error that occurred during the + * operation. + * + * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_detail = ''; + /** + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * + * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time at which this operation was completed. + * @type string $target + * Output only. The name of the resource associated to this operation. + * @type string $status_detail + * Output only. Human-readable status of the operation, if any. + * @type string $error_detail + * Output only. Human-readable status of any error that occurred during the + * operation. + * @type string $verb + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * @type bool $requested_cancellation + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time at which this operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this operation was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time at which this operation was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The name of the resource associated to this operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. The name of the resource associated to this operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusDetail() + { + return $this->status_detail; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusDetail($var) + { + GPBUtil::checkString($var, True); + $this->status_detail = $var; + + return $this; + } + + /** + * Output only. Human-readable status of any error that occurred during the + * operation. + * + * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getErrorDetail() + { + return $this->error_detail; + } + + /** + * Output only. Human-readable status of any error that occurred during the + * operation. + * + * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setErrorDetail($var) + { + GPBUtil::checkString($var, True); + $this->error_detail = $var; + + return $this; + } + + /** + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * + * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * + * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php new file mode 100644 index 000000000000..c78be2466d12 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.ReplicaPlacement + */ +class ReplicaPlacement extends \Google\Protobuf\Internal\Message +{ + /** + * Required. For a given replica, the ARM ID of the subnet where the control + * plane VM is deployed. Make sure it's a subnet under the virtual network in + * the cluster configuration. + * + * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subnet_id = ''; + /** + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. + * + * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_availability_zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $subnet_id + * Required. For a given replica, the ARM ID of the subnet where the control + * plane VM is deployed. Make sure it's a subnet under the virtual network in + * the cluster configuration. + * @type string $azure_availability_zone + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. For a given replica, the ARM ID of the subnet where the control + * plane VM is deployed. Make sure it's a subnet under the virtual network in + * the cluster configuration. + * + * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubnetId() + { + return $this->subnet_id; + } + + /** + * Required. For a given replica, the ARM ID of the subnet where the control + * plane VM is deployed. Make sure it's a subnet under the virtual network in + * the cluster configuration. + * + * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubnetId($var) + { + GPBUtil::checkString($var, True); + $this->subnet_id = $var; + + return $this; + } + + /** + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. + * + * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAzureAvailabilityZone() + { + return $this->azure_availability_zone; + } + + /** + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. + * + * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAzureAvailabilityZone($var) + { + GPBUtil::checkString($var, True); + $this->azure_availability_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php new file mode 100644 index 000000000000..6d5b8a8bbc0d --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php @@ -0,0 +1,151 @@ +google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest + */ +class RollbackAwsNodePoolUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Option for rollback to ignore the PodDisruptionBudget when + * draining the node pool nodes. Default value is false. + * + * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $respect_pdb = false; + + /** + * @param string $name Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. + * + * @return \Google\Cloud\GkeMultiCloud\V1\RollbackAwsNodePoolUpdateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @type bool $respect_pdb + * Optional. Option for rollback to ignore the PodDisruptionBudget when + * draining the node pool nodes. Default value is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Option for rollback to ignore the PodDisruptionBudget when + * draining the node pool nodes. Default value is false. + * + * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRespectPdb() + { + return $this->respect_pdb; + } + + /** + * Optional. Option for rollback to ignore the PodDisruptionBudget when + * draining the node pool nodes. Default value is false. + * + * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRespectPdb($var) + { + GPBUtil::checkBool($var); + $this->respect_pdb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php new file mode 100644 index 000000000000..b618a0428969 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php @@ -0,0 +1,67 @@ +google.cloud.gkemulticloud.v1.SpotConfig + */ +class SpotConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of instance types for creating spot node pool. + * + * Generated from protobuf field repeated string instance_types = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $instance_types + * Required. A list of instance types for creating spot node pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of instance types for creating spot node pool. + * + * Generated from protobuf field repeated string instance_types = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceTypes() + { + return $this->instance_types; + } + + /** + * Required. A list of instance types for creating spot node pool. + * + * Generated from protobuf field repeated string instance_types = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instance_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php new file mode 100644 index 000000000000..80494e596f75 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php @@ -0,0 +1,113 @@ +google.cloud.gkemulticloud.v1.SurgeSettings + */ +class SurgeSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum number of nodes that can be created beyond the + * current size of the node pool during the update process. + * + * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_surge = 0; + /** + * Optional. The maximum number of nodes that can be simultaneously + * unavailable during the update process. A node is considered unavailable if + * its status is not Ready. + * + * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_unavailable = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_surge + * Optional. The maximum number of nodes that can be created beyond the + * current size of the node pool during the update process. + * @type int $max_unavailable + * Optional. The maximum number of nodes that can be simultaneously + * unavailable during the update process. A node is considered unavailable if + * its status is not Ready. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum number of nodes that can be created beyond the + * current size of the node pool during the update process. + * + * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxSurge() + { + return $this->max_surge; + } + + /** + * Optional. The maximum number of nodes that can be created beyond the + * current size of the node pool during the update process. + * + * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxSurge($var) + { + GPBUtil::checkInt32($var); + $this->max_surge = $var; + + return $this; + } + + /** + * Optional. The maximum number of nodes that can be simultaneously + * unavailable during the update process. A node is considered unavailable if + * its status is not Ready. + * + * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxUnavailable() + { + return $this->max_unavailable; + } + + /** + * Optional. The maximum number of nodes that can be simultaneously + * unavailable during the update process. A node is considered unavailable if + * its status is not Ready. + * + * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxUnavailable($var) + { + GPBUtil::checkInt32($var); + $this->max_unavailable = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php new file mode 100644 index 000000000000..a45ece2a28f9 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php @@ -0,0 +1,246 @@ +google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest + */ +class UpdateAttachedClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attached_cluster = null; + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * * `annotations`. + * * `authorization.admin_groups`. + * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * + * * `annotations`. + * * `authorization.admin_groups`. + * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. + * + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAttachedCluster($attachedCluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attached_cluster + * Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * @type bool $validate_only + * If set, only validate the request, but do not actually update the cluster. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * * `annotations`. + * * `authorization.admin_groups`. + * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster|null + */ + public function getAttachedCluster() + { + return $this->attached_cluster; + } + + public function hasAttachedCluster() + { + return isset($this->attached_cluster); + } + + public function clearAttachedCluster() + { + unset($this->attached_cluster); + } + + /** + * Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $var + * @return $this + */ + public function setAttachedCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); + $this->attached_cluster = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * * `annotations`. + * * `authorization.admin_groups`. + * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * * `annotations`. + * * `authorization.admin_groups`. + * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php new file mode 100644 index 000000000000..401b27d1d3e5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php @@ -0,0 +1,321 @@ +google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + */ +class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_cluster = null; + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + * + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. + * + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAwsCluster($awsCluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\AwsCluster $aws_cluster + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. + * @type bool $validate_only + * If set, only validate the request, but do not actually update the cluster. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null + */ + public function getAwsCluster() + { + return $this->aws_cluster; + } + + public function hasAwsCluster() + { + return isset($this->aws_cluster); + } + + public function clearAwsCluster() + { + unset($this->aws_cluster); + } + + /** + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var + * @return $this + */ + public function setAwsCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); + $this->aws_cluster = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php new file mode 100644 index 000000000000..e118a1b99de6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php @@ -0,0 +1,336 @@ +google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + */ +class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aws_node_pool = null; + /** + * If set, only validate the request, but don't actually update the node pool. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + * + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. + * + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAwsNodePool($awsNodePool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $aws_node_pool + * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * @type bool $validate_only + * If set, only validate the request, but don't actually update the node pool. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool|null + */ + public function getAwsNodePool() + { + return $this->aws_node_pool; + } + + public function hasAwsNodePool() + { + return isset($this->aws_node_pool); + } + + public function clearAwsNodePool() + { + unset($this->aws_node_pool); + } + + /** + * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $var + * @return $this + */ + public function setAwsNodePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); + $this->aws_node_pool = $var; + + return $this; + } + + /** + * If set, only validate the request, but don't actually update the node pool. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but don't actually update the node pool. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php new file mode 100644 index 000000000000..19ebd29cfa43 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php @@ -0,0 +1,271 @@ +google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest + */ +class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_cluster = null; + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `control_plane.root_volume.size_gib`. + * * `azure_services_authentication`. + * * `azure_services_authentication.tenant_id`. + * * `azure_services_authentication.application_id`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + * + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `control_plane.root_volume.size_gib`. + * * `azure_services_authentication`. + * * `azure_services_authentication.tenant_id`. + * * `azure_services_authentication.application_id`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAzureCluster($azureCluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azure_cluster + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * @type bool $validate_only + * If set, only validate the request, but do not actually update the cluster. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `control_plane.root_volume.size_gib`. + * * `azure_services_authentication`. + * * `azure_services_authentication.tenant_id`. + * * `azure_services_authentication.application_id`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null + */ + public function getAzureCluster() + { + return $this->azure_cluster; + } + + public function hasAzureCluster() + { + return isset($this->azure_cluster); + } + + public function clearAzureCluster() + { + unset($this->azure_cluster); + } + + /** + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var + * @return $this + */ + public function setAzureCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); + $this->azure_cluster = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `control_plane.root_volume.size_gib`. + * * `azure_services_authentication`. + * * `azure_services_authentication.tenant_id`. + * * `azure_services_authentication.application_id`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `control_plane.root_volume.size_gib`. + * * `azure_services_authentication`. + * * `azure_services_authentication.tenant_id`. + * * `azure_services_authentication.application_id`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php new file mode 100644 index 000000000000..bb297a85b6dd --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php @@ -0,0 +1,221 @@ +google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest + */ +class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $azure_node_pool = null; + /** + * If set, only validate the request, but don't actually update the node pool. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + * + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. + * + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureNodePoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAzureNodePool($azureNodePool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool + * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * @type bool $validate_only + * If set, only validate the request, but don't actually update the node pool. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool|null + */ + public function getAzureNodePool() + { + return $this->azure_node_pool; + } + + public function hasAzureNodePool() + { + return isset($this->azure_node_pool); + } + + public function clearAzureNodePool() + { + unset($this->azure_node_pool); + } + + /** + * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $var + * @return $this + */ + public function setAzureNodePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); + $this->azure_node_pool = $var; + + return $this; + } + + /** + * If set, only validate the request, but don't actually update the node pool. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but don't actually update the node pool. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php new file mode 100644 index 000000000000..69dd63b604e0 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php @@ -0,0 +1,96 @@ +google.cloud.gkemulticloud.v1.UpdateSettings + */ +class UpdateSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Settings for surge update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $surge_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\SurgeSettings $surge_settings + * Optional. Settings for surge update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Settings for surge update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\SurgeSettings|null + */ + public function getSurgeSettings() + { + return $this->surge_settings; + } + + public function hasSurgeSettings() + { + return isset($this->surge_settings); + } + + public function clearSurgeSettings() + { + unset($this->surge_settings); + } + + /** + * Optional. Settings for surge update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\SurgeSettings $var + * @return $this + */ + public function setSurgeSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SurgeSettings::class); + $this->surge_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php new file mode 100644 index 000000000000..261f7d8542a3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php @@ -0,0 +1,139 @@ +google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + */ +class WorkloadIdentityConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The OIDC issuer URL for this cluster. + * + * Generated from protobuf field string issuer_uri = 1; + */ + protected $issuer_uri = ''; + /** + * The Workload Identity Pool associated to the cluster. + * + * Generated from protobuf field string workload_pool = 2; + */ + protected $workload_pool = ''; + /** + * The ID of the OIDC Identity Provider (IdP) associated to the Workload + * Identity Pool. + * + * Generated from protobuf field string identity_provider = 3; + */ + protected $identity_provider = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer_uri + * The OIDC issuer URL for this cluster. + * @type string $workload_pool + * The Workload Identity Pool associated to the cluster. + * @type string $identity_provider + * The ID of the OIDC Identity Provider (IdP) associated to the Workload + * Identity Pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * The OIDC issuer URL for this cluster. + * + * Generated from protobuf field string issuer_uri = 1; + * @return string + */ + public function getIssuerUri() + { + return $this->issuer_uri; + } + + /** + * The OIDC issuer URL for this cluster. + * + * Generated from protobuf field string issuer_uri = 1; + * @param string $var + * @return $this + */ + public function setIssuerUri($var) + { + GPBUtil::checkString($var, True); + $this->issuer_uri = $var; + + return $this; + } + + /** + * The Workload Identity Pool associated to the cluster. + * + * Generated from protobuf field string workload_pool = 2; + * @return string + */ + public function getWorkloadPool() + { + return $this->workload_pool; + } + + /** + * The Workload Identity Pool associated to the cluster. + * + * Generated from protobuf field string workload_pool = 2; + * @param string $var + * @return $this + */ + public function setWorkloadPool($var) + { + GPBUtil::checkString($var, True); + $this->workload_pool = $var; + + return $this; + } + + /** + * The ID of the OIDC Identity Provider (IdP) associated to the Workload + * Identity Pool. + * + * Generated from protobuf field string identity_provider = 3; + * @return string + */ + public function getIdentityProvider() + { + return $this->identity_provider; + } + + /** + * The ID of the OIDC Identity Provider (IdP) associated to the Workload + * Identity Pool. + * + * Generated from protobuf field string identity_provider = 3; + * @param string $var + * @return $this + */ + public function setIdentityProvider($var) + { + GPBUtil::checkString($var, True); + $this->identity_provider = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php new file mode 100644 index 000000000000..e895597d48c9 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php @@ -0,0 +1,145 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param string $attachedClusterPlatformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param string $attachedClusterDistribution The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks", "generic"]. + * @param string $attachedClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. + * + * Project names are formatted as + * `projects/`. + * @param string $attachedClusterId A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ +function create_attached_cluster_sample( + string $formattedParent, + string $attachedClusterPlatformVersion, + string $attachedClusterDistribution, + string $attachedClusterFleetProject, + string $attachedClusterId +): void { + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedClusterFleet = (new Fleet()) + ->setProject($attachedClusterFleetProject); + $attachedCluster = (new AttachedCluster()) + ->setOidcConfig($attachedClusterOidcConfig) + ->setPlatformVersion($attachedClusterPlatformVersion) + ->setDistribution($attachedClusterDistribution) + ->setFleet($attachedClusterFleet); + $request = (new CreateAttachedClusterRequest()) + ->setParent($formattedParent) + ->setAttachedCluster($attachedCluster) + ->setAttachedClusterId($attachedClusterId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->createAttachedCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AttachedCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterPlatformVersion = '[PLATFORM_VERSION]'; + $attachedClusterDistribution = '[DISTRIBUTION]'; + $attachedClusterFleetProject = '[PROJECT]'; + $attachedClusterId = '[ATTACHED_CLUSTER_ID]'; + + create_attached_cluster_sample( + $formattedParent, + $attachedClusterPlatformVersion, + $attachedClusterDistribution, + $attachedClusterFleetProject, + $attachedClusterId + ); +} +// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php new file mode 100644 index 000000000000..2019bf4fb937 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php @@ -0,0 +1,96 @@ +/locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. + */ +function delete_attached_cluster_sample(string $formattedName): void +{ + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $request = (new DeleteAttachedClusterRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->deleteAttachedCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AttachedClustersClient::attachedClusterName( + '[PROJECT]', + '[LOCATION]', + '[ATTACHED_CLUSTER]' + ); + + delete_attached_cluster_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php new file mode 100644 index 000000000000..5cb9058cfd36 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php @@ -0,0 +1,93 @@ +setAttachedCluster($formattedAttachedCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + + // Call the API and handle any network failures. + try { + /** @var GenerateAttachedClusterAgentTokenResponse $response */ + $response = $attachedClustersClient->generateAttachedClusterAgentToken($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAttachedCluster = AttachedClustersClient::attachedClusterName( + '[PROJECT]', + '[LOCATION]', + '[ATTACHED_CLUSTER]' + ); + $subjectToken = '[SUBJECT_TOKEN]'; + $subjectTokenType = '[SUBJECT_TOKEN_TYPE]'; + $version = '[VERSION]'; + + generate_attached_cluster_agent_token_sample( + $formattedAttachedCluster, + $subjectToken, + $subjectTokenType, + $version + ); +} +// [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterAgentToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php new file mode 100644 index 000000000000..cf483a4552e3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php @@ -0,0 +1,109 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param string $attachedClusterId A client provided ID of the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as + * `projects//locations//memberships/`. + * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + */ +function generate_attached_cluster_install_manifest_sample( + string $formattedParent, + string $attachedClusterId, + string $platformVersion +): void { + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $request = (new GenerateAttachedClusterInstallManifestRequest()) + ->setParent($formattedParent) + ->setAttachedClusterId($attachedClusterId) + ->setPlatformVersion($platformVersion); + + // Call the API and handle any network failures. + try { + /** @var GenerateAttachedClusterInstallManifestResponse $response */ + $response = $attachedClustersClient->generateAttachedClusterInstallManifest($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = '[ATTACHED_CLUSTER_ID]'; + $platformVersion = '[PLATFORM_VERSION]'; + + generate_attached_cluster_install_manifest_sample( + $formattedParent, + $attachedClusterId, + $platformVersion + ); +} +// [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php new file mode 100644 index 000000000000..21825508bbc6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php @@ -0,0 +1,84 @@ +/locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. + */ +function get_attached_cluster_sample(string $formattedName): void +{ + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $request = (new GetAttachedClusterRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AttachedCluster $response */ + $response = $attachedClustersClient->getAttachedCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AttachedClustersClient::attachedClusterName( + '[PROJECT]', + '[LOCATION]', + '[ATTACHED_CLUSTER]' + ); + + get_attached_cluster_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php new file mode 100644 index 000000000000..99f834a49d4c --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php @@ -0,0 +1,80 @@ +/locations//attachedServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field. + */ +function get_attached_server_config_sample(string $formattedName): void +{ + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $request = (new GetAttachedServerConfigRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AttachedServerConfig $response */ + $response = $attachedClustersClient->getAttachedServerConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AttachedClustersClient::attachedServerConfigName('[PROJECT]', '[LOCATION]'); + + get_attached_server_config_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php new file mode 100644 index 000000000000..6e935b3a2d9e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php @@ -0,0 +1,118 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param string $fleetMembership The name of the fleet membership resource to import. + * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param string $distribution The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks"]. + */ +function import_attached_cluster_sample( + string $formattedParent, + string $fleetMembership, + string $platformVersion, + string $distribution +): void { + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $request = (new ImportAttachedClusterRequest()) + ->setParent($formattedParent) + ->setFleetMembership($fleetMembership) + ->setPlatformVersion($platformVersion) + ->setDistribution($distribution); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->importAttachedCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AttachedCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = '[FLEET_MEMBERSHIP]'; + $platformVersion = '[PLATFORM_VERSION]'; + $distribution = '[DISTRIBUTION]'; + + import_attached_cluster_sample($formattedParent, $fleetMembership, $platformVersion, $distribution); +} +// [END gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php new file mode 100644 index 000000000000..b9fabcf1a3b4 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php @@ -0,0 +1,83 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + */ +function list_attached_clusters_sample(string $formattedParent): void +{ + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $request = (new ListAttachedClustersRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $attachedClustersClient->listAttachedClusters($request); + + /** @var AttachedCluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); + + list_attached_clusters_sample($formattedParent); +} +// [END gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php new file mode 100644 index 000000000000..04b14400dc18 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php @@ -0,0 +1,117 @@ +`. + */ +function update_attached_cluster_sample( + string $attachedClusterPlatformVersion, + string $attachedClusterDistribution, + string $attachedClusterFleetProject +): void { + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare the request message. + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedClusterFleet = (new Fleet()) + ->setProject($attachedClusterFleetProject); + $attachedCluster = (new AttachedCluster()) + ->setOidcConfig($attachedClusterOidcConfig) + ->setPlatformVersion($attachedClusterPlatformVersion) + ->setDistribution($attachedClusterDistribution) + ->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAttachedClusterRequest()) + ->setAttachedCluster($attachedCluster) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->updateAttachedCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AttachedCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $attachedClusterPlatformVersion = '[PLATFORM_VERSION]'; + $attachedClusterDistribution = '[DISTRIBUTION]'; + $attachedClusterFleetProject = '[PROJECT]'; + + update_attached_cluster_sample( + $attachedClusterPlatformVersion, + $attachedClusterDistribution, + $attachedClusterFleetProject + ); +} +// [END gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php new file mode 100644 index 000000000000..1f217acadf94 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php @@ -0,0 +1,220 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::locationName()} for help formatting this field. + * @param string $awsClusterNetworkingVpcId The VPC associated with the cluster. All component clusters + * (i.e. control plane and node pools) run on a single VPC. + * + * This field cannot be changed after creation. + * @param string $awsClusterNetworkingPodAddressCidrBlocksElement All pods in the cluster are assigned an IPv4 address from these + * ranges. Only a single range is supported. This field cannot be changed + * after creation. + * @param string $awsClusterNetworkingServiceAddressCidrBlocksElement All services in the cluster are assigned an IPv4 address from + * these ranges. Only a single range is supported. This field cannot be + * changed after creation. + * @param string $awsClusterAwsRegion The AWS region where the cluster runs. + * + * Each Google Cloud region supports a subset of nearby AWS regions. + * You can call + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + * to list all supported AWS regions within a given Google Cloud region. + * @param string $awsClusterControlPlaneVersion The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * @param string $awsClusterControlPlaneSubnetIdsElement The list of subnets where control plane replicas will run. + * A replica will be provisioned on each subnet and up to three values + * can be provided. + * Each subnet must be in a different AWS Availability Zone (AZ). + * @param string $awsClusterControlPlaneIamInstanceProfile The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. + * @param string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt cluster secrets. + * @param string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. + * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. + * @param string $awsClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. + * + * Project names are formatted as + * `projects/`. + * @param string $awsClusterId A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ +function create_aws_cluster_sample( + string $formattedParent, + string $awsClusterNetworkingVpcId, + string $awsClusterNetworkingPodAddressCidrBlocksElement, + string $awsClusterNetworkingServiceAddressCidrBlocksElement, + string $awsClusterAwsRegion, + string $awsClusterControlPlaneVersion, + string $awsClusterControlPlaneSubnetIdsElement, + string $awsClusterControlPlaneIamInstanceProfile, + string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, + string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, + string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, + string $awsClusterFleetProject, + string $awsClusterId +): void { + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $awsClusterNetworkingPodAddressCidrBlocks = [$awsClusterNetworkingPodAddressCidrBlocksElement,]; + $awsClusterNetworkingServiceAddressCidrBlocks = [ + $awsClusterNetworkingServiceAddressCidrBlocksElement, + ]; + $awsClusterNetworking = (new AwsClusterNetworking()) + ->setVpcId($awsClusterNetworkingVpcId) + ->setPodAddressCidrBlocks($awsClusterNetworkingPodAddressCidrBlocks) + ->setServiceAddressCidrBlocks($awsClusterNetworkingServiceAddressCidrBlocks); + $awsClusterControlPlaneSubnetIds = [$awsClusterControlPlaneSubnetIdsElement,]; + $awsClusterControlPlaneDatabaseEncryption = (new AwsDatabaseEncryption()) + ->setKmsKeyArn($awsClusterControlPlaneDatabaseEncryptionKmsKeyArn); + $awsClusterControlPlaneAwsServicesAuthentication = (new AwsServicesAuthentication()) + ->setRoleArn($awsClusterControlPlaneAwsServicesAuthenticationRoleArn); + $awsClusterControlPlaneConfigEncryption = (new AwsConfigEncryption()) + ->setKmsKeyArn($awsClusterControlPlaneConfigEncryptionKmsKeyArn); + $awsClusterControlPlane = (new AwsControlPlane()) + ->setVersion($awsClusterControlPlaneVersion) + ->setSubnetIds($awsClusterControlPlaneSubnetIds) + ->setIamInstanceProfile($awsClusterControlPlaneIamInstanceProfile) + ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) + ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) + ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); + $awsClusterAuthorization = new AwsAuthorization(); + $awsClusterFleet = (new Fleet()) + ->setProject($awsClusterFleetProject); + $awsCluster = (new AwsCluster()) + ->setNetworking($awsClusterNetworking) + ->setAwsRegion($awsClusterAwsRegion) + ->setControlPlane($awsClusterControlPlane) + ->setAuthorization($awsClusterAuthorization) + ->setFleet($awsClusterFleet); + $request = (new CreateAwsClusterRequest()) + ->setParent($formattedParent) + ->setAwsCluster($awsCluster) + ->setAwsClusterId($awsClusterId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->createAwsCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AwsCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AwsClustersClient::locationName('[PROJECT]', '[LOCATION]'); + $awsClusterNetworkingVpcId = '[VPC_ID]'; + $awsClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; + $awsClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; + $awsClusterAwsRegion = '[AWS_REGION]'; + $awsClusterControlPlaneVersion = '[VERSION]'; + $awsClusterControlPlaneSubnetIdsElement = '[SUBNET_IDS]'; + $awsClusterControlPlaneIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; + $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; + $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; + $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; + $awsClusterFleetProject = '[PROJECT]'; + $awsClusterId = '[AWS_CLUSTER_ID]'; + + create_aws_cluster_sample( + $formattedParent, + $awsClusterNetworkingVpcId, + $awsClusterNetworkingPodAddressCidrBlocksElement, + $awsClusterNetworkingServiceAddressCidrBlocksElement, + $awsClusterAwsRegion, + $awsClusterControlPlaneVersion, + $awsClusterControlPlaneSubnetIdsElement, + $awsClusterControlPlaneIamInstanceProfile, + $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, + $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, + $awsClusterControlPlaneConfigEncryptionKmsKeyArn, + $awsClusterFleetProject, + $awsClusterId + ); +} +// [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php new file mode 100644 index 000000000000..225e3f22700a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php @@ -0,0 +1,168 @@ +/locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + * @param string $awsNodePoolVersion The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the + * pool. + * @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. + * @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * @param int $awsNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * @param string $awsNodePoolSubnetId The subnet where the node pool node run. + * @param int $awsNodePoolMaxPodsConstraintMaxPodsPerNode The maximum number of pods to schedule on a single node. + * @param string $awsNodePoolId A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ +function create_aws_node_pool_sample( + string $formattedParent, + string $awsNodePoolVersion, + string $awsNodePoolConfigIamInstanceProfile, + string $awsNodePoolConfigConfigEncryptionKmsKeyArn, + int $awsNodePoolAutoscalingMinNodeCount, + int $awsNodePoolAutoscalingMaxNodeCount, + string $awsNodePoolSubnetId, + int $awsNodePoolMaxPodsConstraintMaxPodsPerNode, + string $awsNodePoolId +): void { + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $awsNodePoolConfigConfigEncryption = (new AwsConfigEncryption()) + ->setKmsKeyArn($awsNodePoolConfigConfigEncryptionKmsKeyArn); + $awsNodePoolConfig = (new AwsNodeConfig()) + ->setIamInstanceProfile($awsNodePoolConfigIamInstanceProfile) + ->setConfigEncryption($awsNodePoolConfigConfigEncryption); + $awsNodePoolAutoscaling = (new AwsNodePoolAutoscaling()) + ->setMinNodeCount($awsNodePoolAutoscalingMinNodeCount) + ->setMaxNodeCount($awsNodePoolAutoscalingMaxNodeCount); + $awsNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) + ->setMaxPodsPerNode($awsNodePoolMaxPodsConstraintMaxPodsPerNode); + $awsNodePool = (new AwsNodePool()) + ->setVersion($awsNodePoolVersion) + ->setConfig($awsNodePoolConfig) + ->setAutoscaling($awsNodePoolAutoscaling) + ->setSubnetId($awsNodePoolSubnetId) + ->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $request = (new CreateAwsNodePoolRequest()) + ->setParent($formattedParent) + ->setAwsNodePool($awsNodePool) + ->setAwsNodePoolId($awsNodePoolId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->createAwsNodePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AwsNodePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $awsNodePoolVersion = '[VERSION]'; + $awsNodePoolConfigIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; + $awsNodePoolConfigConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; + $awsNodePoolAutoscalingMinNodeCount = 0; + $awsNodePoolAutoscalingMaxNodeCount = 0; + $awsNodePoolSubnetId = '[SUBNET_ID]'; + $awsNodePoolMaxPodsConstraintMaxPodsPerNode = 0; + $awsNodePoolId = '[AWS_NODE_POOL_ID]'; + + create_aws_node_pool_sample( + $formattedParent, + $awsNodePoolVersion, + $awsNodePoolConfigIamInstanceProfile, + $awsNodePoolConfigConfigEncryptionKmsKeyArn, + $awsNodePoolAutoscalingMinNodeCount, + $awsNodePoolAutoscalingMaxNodeCount, + $awsNodePoolSubnetId, + $awsNodePoolMaxPodsConstraintMaxPodsPerNode, + $awsNodePoolId + ); +} +// [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php new file mode 100644 index 000000000000..60b7bd24972c --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php @@ -0,0 +1,95 @@ +/locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + */ +function delete_aws_cluster_sample(string $formattedName): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new DeleteAwsClusterRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->deleteAwsCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + + delete_aws_cluster_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php new file mode 100644 index 000000000000..394f463f21e8 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php @@ -0,0 +1,97 @@ +/locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. + */ +function delete_aws_node_pool_sample(string $formattedName): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new DeleteAwsNodePoolRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->deleteAwsNodePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AwsClustersClient::awsNodePoolName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]', + '[AWS_NODE_POOL]' + ); + + delete_aws_node_pool_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php new file mode 100644 index 000000000000..22f65a87c014 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php @@ -0,0 +1,84 @@ +/locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + */ +function generate_aws_access_token_sample(string $formattedAwsCluster): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new GenerateAwsAccessTokenRequest()) + ->setAwsCluster($formattedAwsCluster); + + // Call the API and handle any network failures. + try { + /** @var GenerateAwsAccessTokenResponse $response */ + $response = $awsClustersClient->generateAwsAccessToken($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAwsCluster = AwsClustersClient::awsClusterName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]' + ); + + generate_aws_access_token_sample($formattedAwsCluster); +} +// [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php new file mode 100644 index 000000000000..118f7eedc248 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php @@ -0,0 +1,93 @@ +setAwsCluster($formattedAwsCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + + // Call the API and handle any network failures. + try { + /** @var GenerateAwsClusterAgentTokenResponse $response */ + $response = $awsClustersClient->generateAwsClusterAgentToken($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAwsCluster = AwsClustersClient::awsClusterName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]' + ); + $subjectToken = '[SUBJECT_TOKEN]'; + $subjectTokenType = '[SUBJECT_TOKEN_TYPE]'; + $version = '[VERSION]'; + + generate_aws_cluster_agent_token_sample( + $formattedAwsCluster, + $subjectToken, + $subjectTokenType, + $version + ); +} +// [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsClusterAgentToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php new file mode 100644 index 000000000000..8274cfa21370 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php @@ -0,0 +1,80 @@ +/locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + */ +function get_aws_cluster_sample(string $formattedName): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new GetAwsClusterRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AwsCluster $response */ + $response = $awsClustersClient->getAwsCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + + get_aws_cluster_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php new file mode 100644 index 000000000000..d29dde35b07f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php @@ -0,0 +1,78 @@ +setAwsCluster($formattedAwsCluster); + + // Call the API and handle any network failures. + try { + /** @var AwsJsonWebKeys $response */ + $response = $awsClustersClient->getAwsJsonWebKeys($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAwsCluster = AwsClustersClient::awsClusterName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]' + ); + + get_aws_json_web_keys_sample($formattedAwsCluster); +} +// [END gkemulticloud_v1_generated_AwsClusters_GetAwsJsonWebKeys_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php new file mode 100644 index 000000000000..b3b8771c0b23 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php @@ -0,0 +1,85 @@ +/locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. + */ +function get_aws_node_pool_sample(string $formattedName): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new GetAwsNodePoolRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AwsNodePool $response */ + $response = $awsClustersClient->getAwsNodePool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AwsClustersClient::awsNodePoolName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]', + '[AWS_NODE_POOL]' + ); + + get_aws_node_pool_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php new file mode 100644 index 000000000000..9d913950a8c2 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php @@ -0,0 +1,81 @@ +setAwsCluster($formattedAwsCluster); + + // Call the API and handle any network failures. + try { + /** @var AwsOpenIdConfig $response */ + $response = $awsClustersClient->getAwsOpenIdConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAwsCluster = AwsClustersClient::awsClusterName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]' + ); + + get_aws_open_id_config_sample($formattedAwsCluster); +} +// [END gkemulticloud_v1_generated_AwsClusters_GetAwsOpenIdConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php new file mode 100644 index 000000000000..c450dd0bcef3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php @@ -0,0 +1,80 @@ +/locations//awsServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsServerConfigName()} for help formatting this field. + */ +function get_aws_server_config_sample(string $formattedName): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new GetAwsServerConfigRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AwsServerConfig $response */ + $response = $awsClustersClient->getAwsServerConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AwsClustersClient::awsServerConfigName('[PROJECT]', '[LOCATION]'); + + get_aws_server_config_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php new file mode 100644 index 000000000000..7f82224f8ca8 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php @@ -0,0 +1,83 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AwsClustersClient::locationName()} for help formatting this field. + */ +function list_aws_clusters_sample(string $formattedParent): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new ListAwsClustersRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $awsClustersClient->listAwsClusters($request); + + /** @var AwsCluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AwsClustersClient::locationName('[PROJECT]', '[LOCATION]'); + + list_aws_clusters_sample($formattedParent); +} +// [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php new file mode 100644 index 000000000000..9d94de3abcb2 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php @@ -0,0 +1,85 @@ +/locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsClusterName()} for help formatting this field. + */ +function list_aws_node_pools_sample(string $formattedParent): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new ListAwsNodePoolsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $awsClustersClient->listAwsNodePools($request); + + /** @var AwsNodePool $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + + list_aws_node_pools_sample($formattedParent); +} +// [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php new file mode 100644 index 000000000000..9c1127b124a6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php @@ -0,0 +1,101 @@ +/locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. + */ +function rollback_aws_node_pool_update_sample(string $formattedName): void +{ + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $request = (new RollbackAwsNodePoolUpdateRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->rollbackAwsNodePoolUpdate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AwsNodePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AwsClustersClient::awsNodePoolName( + '[PROJECT]', + '[LOCATION]', + '[AWS_CLUSTER]', + '[AWS_NODE_POOL]' + ); + + rollback_aws_node_pool_update_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AwsClusters_RollbackAwsNodePoolUpdate_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php new file mode 100644 index 000000000000..e5b56934207f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php @@ -0,0 +1,192 @@ +`. + */ +function update_aws_cluster_sample( + string $awsClusterNetworkingVpcId, + string $awsClusterNetworkingPodAddressCidrBlocksElement, + string $awsClusterNetworkingServiceAddressCidrBlocksElement, + string $awsClusterAwsRegion, + string $awsClusterControlPlaneVersion, + string $awsClusterControlPlaneSubnetIdsElement, + string $awsClusterControlPlaneIamInstanceProfile, + string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, + string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, + string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, + string $awsClusterFleetProject +): void { + // Create a client. + $awsClustersClient = new AwsClustersClient(); + + // Prepare the request message. + $awsClusterNetworkingPodAddressCidrBlocks = [$awsClusterNetworkingPodAddressCidrBlocksElement,]; + $awsClusterNetworkingServiceAddressCidrBlocks = [ + $awsClusterNetworkingServiceAddressCidrBlocksElement, + ]; + $awsClusterNetworking = (new AwsClusterNetworking()) + ->setVpcId($awsClusterNetworkingVpcId) + ->setPodAddressCidrBlocks($awsClusterNetworkingPodAddressCidrBlocks) + ->setServiceAddressCidrBlocks($awsClusterNetworkingServiceAddressCidrBlocks); + $awsClusterControlPlaneSubnetIds = [$awsClusterControlPlaneSubnetIdsElement,]; + $awsClusterControlPlaneDatabaseEncryption = (new AwsDatabaseEncryption()) + ->setKmsKeyArn($awsClusterControlPlaneDatabaseEncryptionKmsKeyArn); + $awsClusterControlPlaneAwsServicesAuthentication = (new AwsServicesAuthentication()) + ->setRoleArn($awsClusterControlPlaneAwsServicesAuthenticationRoleArn); + $awsClusterControlPlaneConfigEncryption = (new AwsConfigEncryption()) + ->setKmsKeyArn($awsClusterControlPlaneConfigEncryptionKmsKeyArn); + $awsClusterControlPlane = (new AwsControlPlane()) + ->setVersion($awsClusterControlPlaneVersion) + ->setSubnetIds($awsClusterControlPlaneSubnetIds) + ->setIamInstanceProfile($awsClusterControlPlaneIamInstanceProfile) + ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) + ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) + ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); + $awsClusterAuthorization = new AwsAuthorization(); + $awsClusterFleet = (new Fleet()) + ->setProject($awsClusterFleetProject); + $awsCluster = (new AwsCluster()) + ->setNetworking($awsClusterNetworking) + ->setAwsRegion($awsClusterAwsRegion) + ->setControlPlane($awsClusterControlPlane) + ->setAuthorization($awsClusterAuthorization) + ->setFleet($awsClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAwsClusterRequest()) + ->setAwsCluster($awsCluster) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->updateAwsCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AwsCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $awsClusterNetworkingVpcId = '[VPC_ID]'; + $awsClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; + $awsClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; + $awsClusterAwsRegion = '[AWS_REGION]'; + $awsClusterControlPlaneVersion = '[VERSION]'; + $awsClusterControlPlaneSubnetIdsElement = '[SUBNET_IDS]'; + $awsClusterControlPlaneIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; + $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; + $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; + $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; + $awsClusterFleetProject = '[PROJECT]'; + + update_aws_cluster_sample( + $awsClusterNetworkingVpcId, + $awsClusterNetworkingPodAddressCidrBlocksElement, + $awsClusterNetworkingServiceAddressCidrBlocksElement, + $awsClusterAwsRegion, + $awsClusterControlPlaneVersion, + $awsClusterControlPlaneSubnetIdsElement, + $awsClusterControlPlaneIamInstanceProfile, + $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, + $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, + $awsClusterControlPlaneConfigEncryptionKmsKeyArn, + $awsClusterFleetProject + ); +} +// [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php new file mode 100644 index 000000000000..b3ca4e0cc0c7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php @@ -0,0 +1,140 @@ +setKmsKeyArn($awsNodePoolConfigConfigEncryptionKmsKeyArn); + $awsNodePoolConfig = (new AwsNodeConfig()) + ->setIamInstanceProfile($awsNodePoolConfigIamInstanceProfile) + ->setConfigEncryption($awsNodePoolConfigConfigEncryption); + $awsNodePoolAutoscaling = (new AwsNodePoolAutoscaling()) + ->setMinNodeCount($awsNodePoolAutoscalingMinNodeCount) + ->setMaxNodeCount($awsNodePoolAutoscalingMaxNodeCount); + $awsNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) + ->setMaxPodsPerNode($awsNodePoolMaxPodsConstraintMaxPodsPerNode); + $awsNodePool = (new AwsNodePool()) + ->setVersion($awsNodePoolVersion) + ->setConfig($awsNodePoolConfig) + ->setAutoscaling($awsNodePoolAutoscaling) + ->setSubnetId($awsNodePoolSubnetId) + ->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $request = (new UpdateAwsNodePoolRequest()) + ->setAwsNodePool($awsNodePool) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $awsClustersClient->updateAwsNodePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AwsNodePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $awsNodePoolVersion = '[VERSION]'; + $awsNodePoolConfigIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; + $awsNodePoolConfigConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; + $awsNodePoolAutoscalingMinNodeCount = 0; + $awsNodePoolAutoscalingMaxNodeCount = 0; + $awsNodePoolSubnetId = '[SUBNET_ID]'; + $awsNodePoolMaxPodsConstraintMaxPodsPerNode = 0; + + update_aws_node_pool_sample( + $awsNodePoolVersion, + $awsNodePoolConfigIamInstanceProfile, + $awsNodePoolConfigConfigEncryptionKmsKeyArn, + $awsNodePoolAutoscalingMinNodeCount, + $awsNodePoolAutoscalingMaxNodeCount, + $awsNodePoolSubnetId, + $awsNodePoolMaxPodsConstraintMaxPodsPerNode + ); +} +// [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php new file mode 100644 index 000000000000..1bd2f69f9612 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php @@ -0,0 +1,127 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + * @param string $azureClientTenantId The Azure Active Directory Tenant ID. + * @param string $azureClientApplicationId The Azure Active Directory Application ID. + * @param string $azureClientId A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ +function create_azure_client_sample( + string $formattedParent, + string $azureClientTenantId, + string $azureClientApplicationId, + string $azureClientId +): void { + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $azureClient = (new AzureClient()) + ->setTenantId($azureClientTenantId) + ->setApplicationId($azureClientApplicationId); + $request = (new CreateAzureClientRequest()) + ->setParent($formattedParent) + ->setAzureClient($azureClient) + ->setAzureClientId($azureClientId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->createAzureClient($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AzureClient $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); + $azureClientTenantId = '[TENANT_ID]'; + $azureClientApplicationId = '[APPLICATION_ID]'; + $azureClientId = '[AZURE_CLIENT_ID]'; + + create_azure_client_sample( + $formattedParent, + $azureClientTenantId, + $azureClientApplicationId, + $azureClientId + ); +} +// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php new file mode 100644 index 000000000000..55a80ce0dbb3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php @@ -0,0 +1,213 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + * @param string $azureClusterAzureRegion The Azure region where the cluster runs. + * + * Each Google Cloud region supports a subset of nearby Azure regions. + * You can call + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + * to list all supported Azure regions within a given Google Cloud region. + * @param string $azureClusterResourceGroupId The ARM ID of the resource group where the cluster resources are + * deployed. For example: + * `/subscriptions//resourceGroups/` + * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. + * + * All components in the cluster (i.e. control plane and node pools) run on a + * single VNet. + * + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + * + * This field cannot be changed after creation. + * @param string $azureClusterNetworkingPodAddressCidrBlocksElement The IP address range of the pods in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * + * All pods in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * + * This field cannot be changed after creation. + * @param string $azureClusterNetworkingServiceAddressCidrBlocksElement The IP address range for services in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * + * All services in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * + * This field cannot be changed after creating a cluster. + * @param string $azureClusterControlPlaneVersion The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. + * + * Project names are formatted as + * `projects/`. + * @param string $azureClusterId A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ +function create_azure_cluster_sample( + string $formattedParent, + string $azureClusterAzureRegion, + string $azureClusterResourceGroupId, + string $azureClusterNetworkingVirtualNetworkId, + string $azureClusterNetworkingPodAddressCidrBlocksElement, + string $azureClusterNetworkingServiceAddressCidrBlocksElement, + string $azureClusterControlPlaneVersion, + string $azureClusterControlPlaneSshConfigAuthorizedKey, + string $azureClusterFleetProject, + string $azureClusterId +): void { + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $azureClusterNetworkingPodAddressCidrBlocks = [ + $azureClusterNetworkingPodAddressCidrBlocksElement, + ]; + $azureClusterNetworkingServiceAddressCidrBlocks = [ + $azureClusterNetworkingServiceAddressCidrBlocksElement, + ]; + $azureClusterNetworking = (new AzureClusterNetworking()) + ->setVirtualNetworkId($azureClusterNetworkingVirtualNetworkId) + ->setPodAddressCidrBlocks($azureClusterNetworkingPodAddressCidrBlocks) + ->setServiceAddressCidrBlocks($azureClusterNetworkingServiceAddressCidrBlocks); + $azureClusterControlPlaneSshConfig = (new AzureSshConfig()) + ->setAuthorizedKey($azureClusterControlPlaneSshConfigAuthorizedKey); + $azureClusterControlPlane = (new AzureControlPlane()) + ->setVersion($azureClusterControlPlaneVersion) + ->setSshConfig($azureClusterControlPlaneSshConfig); + $azureClusterAuthorization = new AzureAuthorization(); + $azureClusterFleet = (new Fleet()) + ->setProject($azureClusterFleetProject); + $azureCluster = (new AzureCluster()) + ->setAzureRegion($azureClusterAzureRegion) + ->setResourceGroupId($azureClusterResourceGroupId) + ->setNetworking($azureClusterNetworking) + ->setControlPlane($azureClusterControlPlane) + ->setAuthorization($azureClusterAuthorization) + ->setFleet($azureClusterFleet); + $request = (new CreateAzureClusterRequest()) + ->setParent($formattedParent) + ->setAzureCluster($azureCluster) + ->setAzureClusterId($azureClusterId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->createAzureCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AzureCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); + $azureClusterAzureRegion = '[AZURE_REGION]'; + $azureClusterResourceGroupId = '[RESOURCE_GROUP_ID]'; + $azureClusterNetworkingVirtualNetworkId = '[VIRTUAL_NETWORK_ID]'; + $azureClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; + $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; + $azureClusterControlPlaneVersion = '[VERSION]'; + $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; + $azureClusterFleetProject = '[PROJECT]'; + $azureClusterId = '[AZURE_CLUSTER_ID]'; + + create_azure_cluster_sample( + $formattedParent, + $azureClusterAzureRegion, + $azureClusterResourceGroupId, + $azureClusterNetworkingVirtualNetworkId, + $azureClusterNetworkingPodAddressCidrBlocksElement, + $azureClusterNetworkingServiceAddressCidrBlocksElement, + $azureClusterControlPlaneVersion, + $azureClusterControlPlaneSshConfigAuthorizedKey, + $azureClusterFleetProject, + $azureClusterId + ); +} +// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php new file mode 100644 index 000000000000..99bebfaff869 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php @@ -0,0 +1,166 @@ +/locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + * @param string $azureNodePoolVersion The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. + * @param string $azureNodePoolConfigSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * @param string $azureNodePoolSubnetId The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. + * @param int $azureNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. + * @param int $azureNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. + * @param int $azureNodePoolMaxPodsConstraintMaxPodsPerNode The maximum number of pods to schedule on a single node. + * @param string $azureNodePoolId A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ +function create_azure_node_pool_sample( + string $formattedParent, + string $azureNodePoolVersion, + string $azureNodePoolConfigSshConfigAuthorizedKey, + string $azureNodePoolSubnetId, + int $azureNodePoolAutoscalingMinNodeCount, + int $azureNodePoolAutoscalingMaxNodeCount, + int $azureNodePoolMaxPodsConstraintMaxPodsPerNode, + string $azureNodePoolId +): void { + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $azureNodePoolConfigSshConfig = (new AzureSshConfig()) + ->setAuthorizedKey($azureNodePoolConfigSshConfigAuthorizedKey); + $azureNodePoolConfig = (new AzureNodeConfig()) + ->setSshConfig($azureNodePoolConfigSshConfig); + $azureNodePoolAutoscaling = (new AzureNodePoolAutoscaling()) + ->setMinNodeCount($azureNodePoolAutoscalingMinNodeCount) + ->setMaxNodeCount($azureNodePoolAutoscalingMaxNodeCount); + $azureNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) + ->setMaxPodsPerNode($azureNodePoolMaxPodsConstraintMaxPodsPerNode); + $azureNodePool = (new AzureNodePool()) + ->setVersion($azureNodePoolVersion) + ->setConfig($azureNodePoolConfig) + ->setSubnetId($azureNodePoolSubnetId) + ->setAutoscaling($azureNodePoolAutoscaling) + ->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $request = (new CreateAzureNodePoolRequest()) + ->setParent($formattedParent) + ->setAzureNodePool($azureNodePool) + ->setAzureNodePoolId($azureNodePoolId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->createAzureNodePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AzureNodePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + $azureNodePoolVersion = '[VERSION]'; + $azureNodePoolConfigSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; + $azureNodePoolSubnetId = '[SUBNET_ID]'; + $azureNodePoolAutoscalingMinNodeCount = 0; + $azureNodePoolAutoscalingMaxNodeCount = 0; + $azureNodePoolMaxPodsConstraintMaxPodsPerNode = 0; + $azureNodePoolId = '[AZURE_NODE_POOL_ID]'; + + create_azure_node_pool_sample( + $formattedParent, + $azureNodePoolVersion, + $azureNodePoolConfigSshConfigAuthorizedKey, + $azureNodePoolSubnetId, + $azureNodePoolAutoscalingMinNodeCount, + $azureNodePoolAutoscalingMaxNodeCount, + $azureNodePoolMaxPodsConstraintMaxPodsPerNode, + $azureNodePoolId + ); +} +// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php new file mode 100644 index 000000000000..73cd6815764b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php @@ -0,0 +1,96 @@ +/locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClientName()} for help formatting this field. + */ +function delete_azure_client_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new DeleteAzureClientRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->deleteAzureClient($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + + delete_azure_client_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php new file mode 100644 index 000000000000..3db6efc56b76 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php @@ -0,0 +1,99 @@ +/locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + */ +function delete_azure_cluster_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new DeleteAzureClusterRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->deleteAzureCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + + delete_azure_cluster_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php new file mode 100644 index 000000000000..09682cc45c23 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php @@ -0,0 +1,97 @@ +/locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. + */ +function delete_azure_node_pool_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new DeleteAzureNodePoolRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->deleteAzureNodePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureNodePoolName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]', + '[AZURE_NODE_POOL]' + ); + + delete_azure_node_pool_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php new file mode 100644 index 000000000000..3f8e1cfd3221 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php @@ -0,0 +1,84 @@ +/locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + */ +function generate_azure_access_token_sample(string $formattedAzureCluster): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GenerateAzureAccessTokenRequest()) + ->setAzureCluster($formattedAzureCluster); + + // Call the API and handle any network failures. + try { + /** @var GenerateAzureAccessTokenResponse $response */ + $response = $azureClustersClient->generateAzureAccessToken($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAzureCluster = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + + generate_azure_access_token_sample($formattedAzureCluster); +} +// [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php new file mode 100644 index 000000000000..18bd1b55aeef --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php @@ -0,0 +1,93 @@ +setAzureCluster($formattedAzureCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + + // Call the API and handle any network failures. + try { + /** @var GenerateAzureClusterAgentTokenResponse $response */ + $response = $azureClustersClient->generateAzureClusterAgentToken($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAzureCluster = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + $subjectToken = '[SUBJECT_TOKEN]'; + $subjectTokenType = '[SUBJECT_TOKEN_TYPE]'; + $version = '[VERSION]'; + + generate_azure_cluster_agent_token_sample( + $formattedAzureCluster, + $subjectToken, + $subjectTokenType, + $version + ); +} +// [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureClusterAgentToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php new file mode 100644 index 000000000000..d5c76b39d6ed --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php @@ -0,0 +1,81 @@ +/locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClientName()} for help formatting this field. + */ +function get_azure_client_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GetAzureClientRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AzureClient $response */ + $response = $azureClustersClient->getAzureClient($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + + get_azure_client_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php new file mode 100644 index 000000000000..50e98138ea61 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php @@ -0,0 +1,84 @@ +/locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + */ +function get_azure_cluster_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GetAzureClusterRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AzureCluster $response */ + $response = $azureClustersClient->getAzureCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + + get_azure_cluster_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php new file mode 100644 index 000000000000..929437f2592a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php @@ -0,0 +1,78 @@ +/locations//azureClusters/ + * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. + */ +function get_azure_json_web_keys_sample(string $formattedAzureCluster): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GetAzureJsonWebKeysRequest()) + ->setAzureCluster($formattedAzureCluster); + + // Call the API and handle any network failures. + try { + /** @var AzureJsonWebKeys $response */ + $response = $azureClustersClient->getAzureJsonWebKeys($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAzureCluster = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + + get_azure_json_web_keys_sample($formattedAzureCluster); +} +// [END gkemulticloud_v1_generated_AzureClusters_GetAzureJsonWebKeys_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php new file mode 100644 index 000000000000..320c19e99bbe --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php @@ -0,0 +1,85 @@ +/locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. + */ +function get_azure_node_pool_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GetAzureNodePoolRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AzureNodePool $response */ + $response = $azureClustersClient->getAzureNodePool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureNodePoolName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]', + '[AZURE_NODE_POOL]' + ); + + get_azure_node_pool_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php new file mode 100644 index 000000000000..295b0894d24e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php @@ -0,0 +1,81 @@ +/locations//azureClusters/ + * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. + */ +function get_azure_open_id_config_sample(string $formattedAzureCluster): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GetAzureOpenIdConfigRequest()) + ->setAzureCluster($formattedAzureCluster); + + // Call the API and handle any network failures. + try { + /** @var AzureOpenIdConfig $response */ + $response = $azureClustersClient->getAzureOpenIdConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAzureCluster = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + + get_azure_open_id_config_sample($formattedAzureCluster); +} +// [END gkemulticloud_v1_generated_AzureClusters_GetAzureOpenIdConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php new file mode 100644 index 000000000000..ac90912218ec --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php @@ -0,0 +1,80 @@ +/locations//azureServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureServerConfigName()} for help formatting this field. + */ +function get_azure_server_config_sample(string $formattedName): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new GetAzureServerConfigRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AzureServerConfig $response */ + $response = $azureClustersClient->getAzureServerConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AzureClustersClient::azureServerConfigName('[PROJECT]', '[LOCATION]'); + + get_azure_server_config_sample($formattedName); +} +// [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php new file mode 100644 index 000000000000..b9ae19b630d4 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php @@ -0,0 +1,83 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + */ +function list_azure_clients_sample(string $formattedParent): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new ListAzureClientsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $azureClustersClient->listAzureClients($request); + + /** @var AzureClient $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); + + list_azure_clients_sample($formattedParent); +} +// [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php new file mode 100644 index 000000000000..084c07a5e087 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php @@ -0,0 +1,83 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. Please see + * {@see AzureClustersClient::locationName()} for help formatting this field. + */ +function list_azure_clusters_sample(string $formattedParent): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new ListAzureClustersRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $azureClustersClient->listAzureClusters($request); + + /** @var AzureCluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); + + list_azure_clusters_sample($formattedParent); +} +// [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php new file mode 100644 index 000000000000..7678ac764a00 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php @@ -0,0 +1,89 @@ +/locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AzureClustersClient::azureClusterName()} for help formatting this field. + */ +function list_azure_node_pools_sample(string $formattedParent): void +{ + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $request = (new ListAzureNodePoolsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $azureClustersClient->listAzureNodePools($request); + + /** @var AzureNodePool $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AzureClustersClient::azureClusterName( + '[PROJECT]', + '[LOCATION]', + '[AZURE_CLUSTER]' + ); + + list_azure_node_pools_sample($formattedParent); +} +// [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php new file mode 100644 index 000000000000..284dffa01f94 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php @@ -0,0 +1,185 @@ +/resourceGroups/` + * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. + * + * All components in the cluster (i.e. control plane and node pools) run on a + * single VNet. + * + * Example: + * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + * + * This field cannot be changed after creation. + * @param string $azureClusterNetworkingPodAddressCidrBlocksElement The IP address range of the pods in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * + * All pods in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * + * This field cannot be changed after creation. + * @param string $azureClusterNetworkingServiceAddressCidrBlocksElement The IP address range for services in this cluster, in CIDR + * notation (e.g. `10.96.0.0/14`). + * + * All services in the cluster get assigned a unique IPv4 address from these + * ranges. Only a single range is supported. + * + * This field cannot be changed after creating a cluster. + * @param string $azureClusterControlPlaneVersion The Kubernetes version to run on control plane replicas + * (e.g. `1.19.10-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. + * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. + * + * Project names are formatted as + * `projects/`. + */ +function update_azure_cluster_sample( + string $azureClusterAzureRegion, + string $azureClusterResourceGroupId, + string $azureClusterNetworkingVirtualNetworkId, + string $azureClusterNetworkingPodAddressCidrBlocksElement, + string $azureClusterNetworkingServiceAddressCidrBlocksElement, + string $azureClusterControlPlaneVersion, + string $azureClusterControlPlaneSshConfigAuthorizedKey, + string $azureClusterFleetProject +): void { + // Create a client. + $azureClustersClient = new AzureClustersClient(); + + // Prepare the request message. + $azureClusterNetworkingPodAddressCidrBlocks = [ + $azureClusterNetworkingPodAddressCidrBlocksElement, + ]; + $azureClusterNetworkingServiceAddressCidrBlocks = [ + $azureClusterNetworkingServiceAddressCidrBlocksElement, + ]; + $azureClusterNetworking = (new AzureClusterNetworking()) + ->setVirtualNetworkId($azureClusterNetworkingVirtualNetworkId) + ->setPodAddressCidrBlocks($azureClusterNetworkingPodAddressCidrBlocks) + ->setServiceAddressCidrBlocks($azureClusterNetworkingServiceAddressCidrBlocks); + $azureClusterControlPlaneSshConfig = (new AzureSshConfig()) + ->setAuthorizedKey($azureClusterControlPlaneSshConfigAuthorizedKey); + $azureClusterControlPlane = (new AzureControlPlane()) + ->setVersion($azureClusterControlPlaneVersion) + ->setSshConfig($azureClusterControlPlaneSshConfig); + $azureClusterAuthorization = new AzureAuthorization(); + $azureClusterFleet = (new Fleet()) + ->setProject($azureClusterFleetProject); + $azureCluster = (new AzureCluster()) + ->setAzureRegion($azureClusterAzureRegion) + ->setResourceGroupId($azureClusterResourceGroupId) + ->setNetworking($azureClusterNetworking) + ->setControlPlane($azureClusterControlPlane) + ->setAuthorization($azureClusterAuthorization) + ->setFleet($azureClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAzureClusterRequest()) + ->setAzureCluster($azureCluster) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->updateAzureCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AzureCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $azureClusterAzureRegion = '[AZURE_REGION]'; + $azureClusterResourceGroupId = '[RESOURCE_GROUP_ID]'; + $azureClusterNetworkingVirtualNetworkId = '[VIRTUAL_NETWORK_ID]'; + $azureClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; + $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; + $azureClusterControlPlaneVersion = '[VERSION]'; + $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; + $azureClusterFleetProject = '[PROJECT]'; + + update_azure_cluster_sample( + $azureClusterAzureRegion, + $azureClusterResourceGroupId, + $azureClusterNetworkingVirtualNetworkId, + $azureClusterNetworkingPodAddressCidrBlocksElement, + $azureClusterNetworkingServiceAddressCidrBlocksElement, + $azureClusterControlPlaneVersion, + $azureClusterControlPlaneSshConfigAuthorizedKey, + $azureClusterFleetProject + ); +} +// [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php new file mode 100644 index 000000000000..875782246004 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php @@ -0,0 +1,133 @@ +setAuthorizedKey($azureNodePoolConfigSshConfigAuthorizedKey); + $azureNodePoolConfig = (new AzureNodeConfig()) + ->setSshConfig($azureNodePoolConfigSshConfig); + $azureNodePoolAutoscaling = (new AzureNodePoolAutoscaling()) + ->setMinNodeCount($azureNodePoolAutoscalingMinNodeCount) + ->setMaxNodeCount($azureNodePoolAutoscalingMaxNodeCount); + $azureNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) + ->setMaxPodsPerNode($azureNodePoolMaxPodsConstraintMaxPodsPerNode); + $azureNodePool = (new AzureNodePool()) + ->setVersion($azureNodePoolVersion) + ->setConfig($azureNodePoolConfig) + ->setSubnetId($azureNodePoolSubnetId) + ->setAutoscaling($azureNodePoolAutoscaling) + ->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $request = (new UpdateAzureNodePoolRequest()) + ->setAzureNodePool($azureNodePool) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $azureClustersClient->updateAzureNodePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AzureNodePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $azureNodePoolVersion = '[VERSION]'; + $azureNodePoolConfigSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; + $azureNodePoolSubnetId = '[SUBNET_ID]'; + $azureNodePoolAutoscalingMinNodeCount = 0; + $azureNodePoolAutoscalingMaxNodeCount = 0; + $azureNodePoolMaxPodsConstraintMaxPodsPerNode = 0; + + update_azure_node_pool_sample( + $azureNodePoolVersion, + $azureNodePoolConfigSshConfigAuthorizedKey, + $azureNodePoolSubnetId, + $azureNodePoolAutoscalingMinNodeCount, + $azureNodePoolAutoscalingMaxNodeCount, + $azureNodePoolMaxPodsConstraintMaxPodsPerNode + ); +} +// [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php new file mode 100644 index 000000000000..e8d698f9abe6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php @@ -0,0 +1,34 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/attached_clusters_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/attached_clusters_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/attached_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/attached_clusters_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * attached_cluster resource. + * + * @param string $project + * @param string $location + * @param string $attachedCluster + * + * @return string The formatted attached_cluster resource. + */ + public static function attachedClusterName(string $project, string $location, string $attachedCluster): string + { + return self::getPathTemplate('attachedCluster')->render([ + 'project' => $project, + 'location' => $location, + 'attached_cluster' => $attachedCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * attached_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted attached_server_config resource. + */ + public static function attachedServerConfigName(string $project, string $location): string + { + return self::getPathTemplate('attachedServerConfig')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster} + * - attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * on a given Google Cloud Platform project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AttachedClustersClient::createAttachedClusterAsync()} + * . + * + * @example samples/V1/AttachedClustersClient/create_attached_cluster.php + * + * @param CreateAttachedClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAttachedCluster(CreateAttachedClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAttachedCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AttachedClustersClient::deleteAttachedClusterAsync()} + * . + * + * @example samples/V1/AttachedClustersClient/delete_attached_cluster.php + * + * @param DeleteAttachedClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAttachedCluster(DeleteAttachedClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAttachedCluster', $request, $callOptions)->wait(); + } + + /** + * Generates an access token for a cluster agent. + * + * The async variant is + * {@see AttachedClustersClient::generateAttachedClusterAgentTokenAsync()} . + * + * @example samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php + * + * @param GenerateAttachedClusterAgentTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAttachedClusterAgentTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAttachedClusterAgentToken(GenerateAttachedClusterAgentTokenRequest $request, array $callOptions = []): GenerateAttachedClusterAgentTokenResponse + { + return $this->startApiCall('GenerateAttachedClusterAgentToken', $request, $callOptions)->wait(); + } + + /** + * Generates the install manifest to be installed on the target cluster. + * + * The async variant is + * {@see AttachedClustersClient::generateAttachedClusterInstallManifestAsync()} . + * + * @example samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php + * + * @param GenerateAttachedClusterInstallManifestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAttachedClusterInstallManifestResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAttachedClusterInstallManifest(GenerateAttachedClusterInstallManifestRequest $request, array $callOptions = []): GenerateAttachedClusterInstallManifestResponse + { + return $this->startApiCall('GenerateAttachedClusterInstallManifest', $request, $callOptions)->wait(); + } + + /** + * Describes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * + * The async variant is {@see AttachedClustersClient::getAttachedClusterAsync()} . + * + * @example samples/V1/AttachedClustersClient/get_attached_cluster.php + * + * @param GetAttachedClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AttachedCluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAttachedCluster(GetAttachedClusterRequest $request, array $callOptions = []): AttachedCluster + { + return $this->startApiCall('GetAttachedCluster', $request, $callOptions)->wait(); + } + + /** + * Returns information, such as supported Kubernetes versions, on a given + * Google Cloud location. + * + * The async variant is + * {@see AttachedClustersClient::getAttachedServerConfigAsync()} . + * + * @example samples/V1/AttachedClustersClient/get_attached_server_config.php + * + * @param GetAttachedServerConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AttachedServerConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAttachedServerConfig(GetAttachedServerConfigRequest $request, array $callOptions = []): AttachedServerConfig + { + return $this->startApiCall('GetAttachedServerConfig', $request, $callOptions)->wait(); + } + + /** + * Imports creates a new + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * by importing an existing Fleet Membership resource. + * + * Attached Clusters created before the introduction of the Anthos Multi-Cloud + * API can be imported through this method. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AttachedClustersClient::importAttachedClusterAsync()} + * . + * + * @example samples/V1/AttachedClustersClient/import_attached_cluster.php + * + * @param ImportAttachedClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importAttachedCluster(ImportAttachedClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportAttachedCluster', $request, $callOptions)->wait(); + } + + /** + * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources on a given Google Cloud project and region. + * + * The async variant is {@see AttachedClustersClient::listAttachedClustersAsync()} + * . + * + * @example samples/V1/AttachedClustersClient/list_attached_clusters.php + * + * @param ListAttachedClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAttachedClusters(ListAttachedClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttachedClusters', $request, $callOptions); + } + + /** + * Updates an + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * + * The async variant is {@see AttachedClustersClient::updateAttachedClusterAsync()} + * . + * + * @example samples/V1/AttachedClustersClient/update_attached_cluster.php + * + * @param UpdateAttachedClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAttachedCluster(UpdateAttachedClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAttachedCluster', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php new file mode 100644 index 000000000000..0f7b6e65be6e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php @@ -0,0 +1,802 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/aws_clusters_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/aws_clusters_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/aws_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/aws_clusters_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a aws_cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $awsCluster + * + * @return string The formatted aws_cluster resource. + */ + public static function awsClusterName(string $project, string $location, string $awsCluster): string + { + return self::getPathTemplate('awsCluster')->render([ + 'project' => $project, + 'location' => $location, + 'aws_cluster' => $awsCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * aws_node_pool resource. + * + * @param string $project + * @param string $location + * @param string $awsCluster + * @param string $awsNodePool + * + * @return string The formatted aws_node_pool resource. + */ + public static function awsNodePoolName(string $project, string $location, string $awsCluster, string $awsNodePool): string + { + return self::getPathTemplate('awsNodePool')->render([ + 'project' => $project, + 'location' => $location, + 'aws_cluster' => $awsCluster, + 'aws_node_pool' => $awsNodePool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * aws_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted aws_server_config resource. + */ + public static function awsServerConfigName(string $project, string $location): string + { + return self::getPathTemplate('awsServerConfig')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - awsCluster: projects/{project}/locations/{location}/awsClusters/{aws_cluster} + * - awsNodePool: projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool} + * - awsServerConfig: projects/{project}/locations/{location}/awsServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource on a given Google Cloud Platform project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AwsClustersClient::createAwsClusterAsync()} . + * + * @example samples/V1/AwsClustersClient/create_aws_cluster.php + * + * @param CreateAwsClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAwsCluster(CreateAwsClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAwsCluster', $request, $callOptions)->wait(); + } + + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AwsClustersClient::createAwsNodePoolAsync()} . + * + * @example samples/V1/AwsClustersClient/create_aws_node_pool.php + * + * @param CreateAwsNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAwsNodePool(CreateAwsNodePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAwsNodePool', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. + * + * Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AwsClustersClient::deleteAwsClusterAsync()} . + * + * @example samples/V1/AwsClustersClient/delete_aws_cluster.php + * + * @param DeleteAwsClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAwsCluster(DeleteAwsClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAwsCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AwsClustersClient::deleteAwsNodePoolAsync()} . + * + * @example samples/V1/AwsClustersClient/delete_aws_node_pool.php + * + * @param DeleteAwsNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAwsNodePool(DeleteAwsNodePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAwsNodePool', $request, $callOptions)->wait(); + } + + /** + * Generates a short-lived access token to authenticate to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + * The async variant is {@see AwsClustersClient::generateAwsAccessTokenAsync()} . + * + * @example samples/V1/AwsClustersClient/generate_aws_access_token.php + * + * @param GenerateAwsAccessTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAwsAccessTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAwsAccessToken(GenerateAwsAccessTokenRequest $request, array $callOptions = []): GenerateAwsAccessTokenResponse + { + return $this->startApiCall('GenerateAwsAccessToken', $request, $callOptions)->wait(); + } + + /** + * Generates an access token for a cluster agent. + * + * The async variant is + * {@see AwsClustersClient::generateAwsClusterAgentTokenAsync()} . + * + * @example samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php + * + * @param GenerateAwsClusterAgentTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAwsClusterAgentTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAwsClusterAgentToken(GenerateAwsClusterAgentTokenRequest $request, array $callOptions = []): GenerateAwsClusterAgentTokenResponse + { + return $this->startApiCall('GenerateAwsClusterAgentToken', $request, $callOptions)->wait(); + } + + /** + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. + * + * The async variant is {@see AwsClustersClient::getAwsClusterAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_cluster.php + * + * @param GetAwsClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsCluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsCluster(GetAwsClusterRequest $request, array $callOptions = []): AwsCluster + { + return $this->startApiCall('GetAwsCluster', $request, $callOptions)->wait(); + } + + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * The async variant is {@see AwsClustersClient::getAwsJsonWebKeysAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_json_web_keys.php + * + * @param GetAwsJsonWebKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsJsonWebKeys + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsJsonWebKeys(GetAwsJsonWebKeysRequest $request, array $callOptions = []): AwsJsonWebKeys + { + return $this->startApiCall('GetAwsJsonWebKeys', $request, $callOptions)->wait(); + } + + /** + * Describes a specific + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + * The async variant is {@see AwsClustersClient::getAwsNodePoolAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_node_pool.php + * + * @param GetAwsNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsNodePool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsNodePool(GetAwsNodePoolRequest $request, array $callOptions = []): AwsNodePool + { + return $this->startApiCall('GetAwsNodePool', $request, $callOptions)->wait(); + } + + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * The async variant is {@see AwsClustersClient::getAwsOpenIdConfigAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_open_id_config.php + * + * @param GetAwsOpenIdConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsOpenIdConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsOpenIdConfig(GetAwsOpenIdConfigRequest $request, array $callOptions = []): AwsOpenIdConfig + { + return $this->startApiCall('GetAwsOpenIdConfig', $request, $callOptions)->wait(); + } + + /** + * Returns information, such as supported AWS regions and Kubernetes + * versions, on a given Google Cloud location. + * + * The async variant is {@see AwsClustersClient::getAwsServerConfigAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_server_config.php + * + * @param GetAwsServerConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsServerConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsServerConfig(GetAwsServerConfigRequest $request, array $callOptions = []): AwsServerConfig + { + return $this->startApiCall('GetAwsServerConfig', $request, $callOptions)->wait(); + } + + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * on a given Google Cloud project and region. + * + * The async variant is {@see AwsClustersClient::listAwsClustersAsync()} . + * + * @example samples/V1/AwsClustersClient/list_aws_clusters.php + * + * @param ListAwsClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAwsClusters(ListAwsClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAwsClusters', $request, $callOptions); + } + + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * The async variant is {@see AwsClustersClient::listAwsNodePoolsAsync()} . + * + * @example samples/V1/AwsClustersClient/list_aws_node_pools.php + * + * @param ListAwsNodePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAwsNodePools(ListAwsNodePoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAwsNodePools', $request, $callOptions); + } + + /** + * Rolls back a previously aborted or failed + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. + * Makes no changes if the last update request successfully finished. + * If an update request is in progress, you cannot rollback the update. + * You must first cancel or let it finish unsuccessfully before you can + * rollback. + * + * The async variant is {@see AwsClustersClient::rollbackAwsNodePoolUpdateAsync()} + * . + * + * @example samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php + * + * @param RollbackAwsNodePoolUpdateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rollbackAwsNodePoolUpdate(RollbackAwsNodePoolUpdateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RollbackAwsNodePoolUpdate', $request, $callOptions)->wait(); + } + + /** + * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * The async variant is {@see AwsClustersClient::updateAwsClusterAsync()} . + * + * @example samples/V1/AwsClustersClient/update_aws_cluster.php + * + * @param UpdateAwsClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAwsCluster(UpdateAwsClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAwsCluster', $request, $callOptions)->wait(); + } + + /** + * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + * The async variant is {@see AwsClustersClient::updateAwsNodePoolAsync()} . + * + * @example samples/V1/AwsClustersClient/update_aws_node_pool.php + * + * @param UpdateAwsNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAwsNodePool(UpdateAwsNodePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAwsNodePool', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php new file mode 100644 index 000000000000..213ededb0949 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php @@ -0,0 +1,922 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/azure_clusters_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/azure_clusters_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/azure_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/azure_clusters_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a azure_client + * resource. + * + * @param string $project + * @param string $location + * @param string $azureClient + * + * @return string The formatted azure_client resource. + */ + public static function azureClientName(string $project, string $location, string $azureClient): string + { + return self::getPathTemplate('azureClient')->render([ + 'project' => $project, + 'location' => $location, + 'azure_client' => $azureClient, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * azure_cluster resource. + * + * @param string $project + * @param string $location + * @param string $azureCluster + * + * @return string The formatted azure_cluster resource. + */ + public static function azureClusterName(string $project, string $location, string $azureCluster): string + { + return self::getPathTemplate('azureCluster')->render([ + 'project' => $project, + 'location' => $location, + 'azure_cluster' => $azureCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * azure_node_pool resource. + * + * @param string $project + * @param string $location + * @param string $azureCluster + * @param string $azureNodePool + * + * @return string The formatted azure_node_pool resource. + */ + public static function azureNodePoolName(string $project, string $location, string $azureCluster, string $azureNodePool): string + { + return self::getPathTemplate('azureNodePool')->render([ + 'project' => $project, + 'location' => $location, + 'azure_cluster' => $azureCluster, + 'azure_node_pool' => $azureNodePool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * azure_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted azure_server_config resource. + */ + public static function azureServerConfigName(string $project, string $location): string + { + return self::getPathTemplate('azureServerConfig')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - azureClient: projects/{project}/locations/{location}/azureClients/{azure_client} + * - azureCluster: projects/{project}/locations/{location}/azureClusters/{azure_cluster} + * - azureNodePool: projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool} + * - azureServerConfig: projects/{project}/locations/{location}/azureServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource on a given Google Cloud project and region. + * + * `AzureClient` resources hold client authentication + * information needed by the Anthos Multicloud API to manage Azure resources + * on your Azure subscription on your behalf. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AzureClustersClient::createAzureClientAsync()} . + * + * @example samples/V1/AzureClustersClient/create_azure_client.php + * + * @param CreateAzureClientRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAzureClient(CreateAzureClientRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAzureClient', $request, $callOptions)->wait(); + } + + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource on a given Google Cloud Platform project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AzureClustersClient::createAzureClusterAsync()} . + * + * @example samples/V1/AzureClustersClient/create_azure_cluster.php + * + * @param CreateAzureClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAzureCluster(CreateAzureClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAzureCluster', $request, $callOptions)->wait(); + } + + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + * attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AzureClustersClient::createAzureNodePoolAsync()} . + * + * @example samples/V1/AzureClustersClient/create_azure_node_pool.php + * + * @param CreateAzureNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAzureNodePool(CreateAzureNodePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAzureNodePool', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource. + * + * If the client is used by one or more clusters, deletion will + * fail and a `FAILED_PRECONDITION` error will be returned. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AzureClustersClient::deleteAzureClientAsync()} . + * + * @example samples/V1/AzureClustersClient/delete_azure_client.php + * + * @param DeleteAzureClientRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAzureClient(DeleteAzureClientRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAzureClient', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + * Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AzureClustersClient::deleteAzureClusterAsync()} . + * + * @example samples/V1/AzureClustersClient/delete_azure_cluster.php + * + * @param DeleteAzureClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAzureCluster(DeleteAzureClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAzureCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * The async variant is {@see AzureClustersClient::deleteAzureNodePoolAsync()} . + * + * @example samples/V1/AzureClustersClient/delete_azure_node_pool.php + * + * @param DeleteAzureNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAzureNodePool(DeleteAzureNodePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAzureNodePool', $request, $callOptions)->wait(); + } + + /** + * Generates a short-lived access token to authenticate to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + * The async variant is {@see AzureClustersClient::generateAzureAccessTokenAsync()} + * . + * + * @example samples/V1/AzureClustersClient/generate_azure_access_token.php + * + * @param GenerateAzureAccessTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAzureAccessTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAzureAccessToken(GenerateAzureAccessTokenRequest $request, array $callOptions = []): GenerateAzureAccessTokenResponse + { + return $this->startApiCall('GenerateAzureAccessToken', $request, $callOptions)->wait(); + } + + /** + * Generates an access token for a cluster agent. + * + * The async variant is + * {@see AzureClustersClient::generateAzureClusterAgentTokenAsync()} . + * + * @example samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php + * + * @param GenerateAzureClusterAgentTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAzureClusterAgentTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAzureClusterAgentToken(GenerateAzureClusterAgentTokenRequest $request, array $callOptions = []): GenerateAzureClusterAgentTokenResponse + { + return $this->startApiCall('GenerateAzureClusterAgentToken', $request, $callOptions)->wait(); + } + + /** + * Describes a specific + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + * The async variant is {@see AzureClustersClient::getAzureClientAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_client.php + * + * @param GetAzureClientRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureClient + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureClient(GetAzureClientRequest $request, array $callOptions = []): AzureClient + { + return $this->startApiCall('GetAzureClient', $request, $callOptions)->wait(); + } + + /** + * Describes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + * The async variant is {@see AzureClustersClient::getAzureClusterAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_cluster.php + * + * @param GetAzureClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureCluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureCluster(GetAzureClusterRequest $request, array $callOptions = []): AzureCluster + { + return $this->startApiCall('GetAzureCluster', $request, $callOptions)->wait(); + } + + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * The async variant is {@see AzureClustersClient::getAzureJsonWebKeysAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_json_web_keys.php + * + * @param GetAzureJsonWebKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureJsonWebKeys + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureJsonWebKeys(GetAzureJsonWebKeysRequest $request, array $callOptions = []): AzureJsonWebKeys + { + return $this->startApiCall('GetAzureJsonWebKeys', $request, $callOptions)->wait(); + } + + /** + * Describes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + * The async variant is {@see AzureClustersClient::getAzureNodePoolAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_node_pool.php + * + * @param GetAzureNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureNodePool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureNodePool(GetAzureNodePoolRequest $request, array $callOptions = []): AzureNodePool + { + return $this->startApiCall('GetAzureNodePool', $request, $callOptions)->wait(); + } + + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * The async variant is {@see AzureClustersClient::getAzureOpenIdConfigAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_open_id_config.php + * + * @param GetAzureOpenIdConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureOpenIdConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureOpenIdConfig(GetAzureOpenIdConfigRequest $request, array $callOptions = []): AzureOpenIdConfig + { + return $this->startApiCall('GetAzureOpenIdConfig', $request, $callOptions)->wait(); + } + + /** + * Returns information, such as supported Azure regions and Kubernetes + * versions, on a given Google Cloud location. + * + * The async variant is {@see AzureClustersClient::getAzureServerConfigAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_server_config.php + * + * @param GetAzureServerConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureServerConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureServerConfig(GetAzureServerConfigRequest $request, array $callOptions = []): AzureServerConfig + { + return $this->startApiCall('GetAzureServerConfig', $request, $callOptions)->wait(); + } + + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources on a given Google Cloud project and region. + * + * The async variant is {@see AzureClustersClient::listAzureClientsAsync()} . + * + * @example samples/V1/AzureClustersClient/list_azure_clients.php + * + * @param ListAzureClientsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAzureClients(ListAzureClientsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAzureClients', $request, $callOptions); + } + + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources on a given Google Cloud project and region. + * + * The async variant is {@see AzureClustersClient::listAzureClustersAsync()} . + * + * @example samples/V1/AzureClustersClient/list_azure_clusters.php + * + * @param ListAzureClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAzureClusters(ListAzureClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAzureClusters', $request, $callOptions); + } + + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * The async variant is {@see AzureClustersClient::listAzureNodePoolsAsync()} . + * + * @example samples/V1/AzureClustersClient/list_azure_node_pools.php + * + * @param ListAzureNodePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAzureNodePools(ListAzureNodePoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAzureNodePools', $request, $callOptions); + } + + /** + * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * The async variant is {@see AzureClustersClient::updateAzureClusterAsync()} . + * + * @example samples/V1/AzureClustersClient/update_azure_cluster.php + * + * @param UpdateAzureClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAzureCluster(UpdateAzureClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAzureCluster', $request, $callOptions)->wait(); + } + + /** + * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + * The async variant is {@see AzureClustersClient::updateAzureNodePoolAsync()} . + * + * @example samples/V1/AzureClustersClient/update_azure_node_pool.php + * + * @param UpdateAzureNodePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAzureNodePool(UpdateAzureNodePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAzureNodePool', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php new file mode 100644 index 000000000000..a8650ccad16e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php @@ -0,0 +1,1123 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $attachedCluster = new AttachedCluster(); + * $attachedClusterId = 'attached_cluster_id'; + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'createAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient}. + */ +class AttachedClustersGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AttachedClusters'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $attachedClusterNameTemplate; + + private static $attachedServerConfigNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/attached_clusters_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/attached_clusters_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/attached_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/attached_clusters_rest_client_config.php', + ], + ], + ]; + } + + private static function getAttachedClusterNameTemplate() + { + if (self::$attachedClusterNameTemplate == null) { + self::$attachedClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/attachedClusters/{attached_cluster}'); + } + + return self::$attachedClusterNameTemplate; + } + + private static function getAttachedServerConfigNameTemplate() + { + if (self::$attachedServerConfigNameTemplate == null) { + self::$attachedServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/attachedServerConfig'); + } + + return self::$attachedServerConfigNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'attachedCluster' => self::getAttachedClusterNameTemplate(), + 'attachedServerConfig' => self::getAttachedServerConfigNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * attached_cluster resource. + * + * @param string $project + * @param string $location + * @param string $attachedCluster + * + * @return string The formatted attached_cluster resource. + */ + public static function attachedClusterName($project, $location, $attachedCluster) + { + return self::getAttachedClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'attached_cluster' => $attachedCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * attached_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted attached_server_config resource. + */ + public static function attachedServerConfigName($project, $location) + { + return self::getAttachedServerConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster} + * - attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * on a given Google Cloud Platform project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $attachedCluster = new AttachedCluster(); + * $attachedClusterId = 'attached_cluster_id'; + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'createAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AttachedCluster $attachedCluster Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAttachedCluster($parent, $attachedCluster, $attachedClusterId, array $optionalArgs = []) + { + $request = new CreateAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAttachedCluster($attachedCluster); + $request->setAttachedClusterId($attachedClusterId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedName = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + * $operationResponse = $attachedClustersClient->deleteAttachedCluster($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->deleteAttachedCluster($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'deleteAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @type bool $allowMissing + * If set to true, and the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * + * Useful for idempotent deletion. + * @type bool $ignoreErrors + * If set to true, the deletion of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * @type string $etag + * The current etag of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAttachedCluster($name, array $optionalArgs = []) + { + $request = new DeleteAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['ignoreErrors'])) { + $request->setIgnoreErrors($optionalArgs['ignoreErrors']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Generates an access token for a cluster agent. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedAttachedCluster = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + * $subjectToken = 'subject_token'; + * $subjectTokenType = 'subject_token_type'; + * $version = 'version'; + * $response = $attachedClustersClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $attachedCluster Required. + * @param string $subjectToken Required. + * @param string $subjectTokenType Required. + * @param string $version Required. + * @param array $optionalArgs { + * Optional. + * + * @type string $grantType + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requestedTokenType + * Optional. + * @type string $options + * Optional. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAttachedClusterAgentToken($attachedCluster, $subjectToken, $subjectTokenType, $version, array $optionalArgs = []) + { + $request = new GenerateAttachedClusterAgentTokenRequest(); + $requestParamHeaders = []; + $request->setAttachedCluster($attachedCluster); + $request->setSubjectToken($subjectToken); + $request->setSubjectTokenType($subjectTokenType); + $request->setVersion($version); + $requestParamHeaders['attached_cluster'] = $attachedCluster; + if (isset($optionalArgs['grantType'])) { + $request->setGrantType($optionalArgs['grantType']); + } + + if (isset($optionalArgs['audience'])) { + $request->setAudience($optionalArgs['audience']); + } + + if (isset($optionalArgs['scope'])) { + $request->setScope($optionalArgs['scope']); + } + + if (isset($optionalArgs['requestedTokenType'])) { + $request->setRequestedTokenType($optionalArgs['requestedTokenType']); + } + + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAttachedClusterAgentToken', GenerateAttachedClusterAgentTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Generates the install manifest to be installed on the target cluster. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $attachedClusterId = 'attached_cluster_id'; + * $platformVersion = 'platform_version'; + * $response = $attachedClustersClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param string $attachedClusterId Required. A client provided ID of the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as + * `projects//locations//memberships/`. + * @param string $platformVersion Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param array $optionalArgs { + * Optional. + * + * @type AttachedProxyConfig $proxyConfig + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAttachedClusterInstallManifest($parent, $attachedClusterId, $platformVersion, array $optionalArgs = []) + { + $request = new GenerateAttachedClusterInstallManifestRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAttachedClusterId($attachedClusterId); + $request->setPlatformVersion($platformVersion); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['proxyConfig'])) { + $request->setProxyConfig($optionalArgs['proxyConfig']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAttachedClusterInstallManifest', GenerateAttachedClusterInstallManifestResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Describes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedName = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + * $response = $attachedClustersClient->getAttachedCluster($formattedName); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster + * + * @throws ApiException if the remote call fails + */ + public function getAttachedCluster($name, array $optionalArgs = []) + { + $request = new GetAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAttachedCluster', AttachedCluster::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns information, such as supported Kubernetes versions, on a given + * Google Cloud location. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedName = $attachedClustersClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + * $response = $attachedClustersClient->getAttachedServerConfig($formattedName); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig + * + * @throws ApiException if the remote call fails + */ + public function getAttachedServerConfig($name, array $optionalArgs = []) + { + $request = new GetAttachedServerConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAttachedServerConfig', AttachedServerConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports creates a new + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * by importing an existing Fleet Membership resource. + * + * Attached Clusters created before the introduction of the Anthos Multi-Cloud + * API can be imported through this method. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $fleetMembership = 'fleet_membership'; + * $platformVersion = 'platform_version'; + * $distribution = 'distribution'; + * $operationResponse = $attachedClustersClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'importAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param string $fleetMembership Required. The name of the fleet membership resource to import. + * @param string $platformVersion Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param string $distribution Required. The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks"]. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually import the cluster. + * @type AttachedProxyConfig $proxyConfig + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importAttachedCluster($parent, $fleetMembership, $platformVersion, $distribution, array $optionalArgs = []) + { + $request = new ImportAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFleetMembership($fleetMembership); + $request->setPlatformVersion($platformVersion); + $request->setDistribution($distribution); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['proxyConfig'])) { + $request->setProxyConfig($optionalArgs['proxyConfig']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources on a given Google Cloud project and region. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $attachedClustersClient->listAttachedClusters($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $attachedClustersClient->listAttachedClusters($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAttachedClusters($parent, array $optionalArgs = []) + { + $request = new ListAttachedClustersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAttachedClusters', $optionalArgs, ListAttachedClustersResponse::class, $request); + } + + /** + * Updates an + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $attachedCluster = new AttachedCluster(); + * $updateMask = new FieldMask(); + * $operationResponse = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'updateAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param AttachedCluster $attachedCluster Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * + * * `annotations`. + * * `authorization.admin_groups`. + * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAttachedCluster($attachedCluster, $updateMask, array $optionalArgs = []) + { + $request = new UpdateAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setAttachedCluster($attachedCluster); + $request->setUpdateMask($updateMask); + $requestParamHeaders['attached_cluster.name'] = $attachedCluster->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php new file mode 100644 index 000000000000..19eb14547a64 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php @@ -0,0 +1,1666 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $awsCluster = new AwsCluster(); + * $awsClusterId = 'aws_cluster_id'; + * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'createAwsCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\GkeMultiCloud\V1\Client\AwsClustersClient}. + */ +class AwsClustersGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AwsClusters'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $awsClusterNameTemplate; + + private static $awsNodePoolNameTemplate; + + private static $awsServerConfigNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/aws_clusters_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/aws_clusters_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/aws_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/aws_clusters_rest_client_config.php', + ], + ], + ]; + } + + private static function getAwsClusterNameTemplate() + { + if (self::$awsClusterNameTemplate == null) { + self::$awsClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/awsClusters/{aws_cluster}'); + } + + return self::$awsClusterNameTemplate; + } + + private static function getAwsNodePoolNameTemplate() + { + if (self::$awsNodePoolNameTemplate == null) { + self::$awsNodePoolNameTemplate = new PathTemplate('projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}'); + } + + return self::$awsNodePoolNameTemplate; + } + + private static function getAwsServerConfigNameTemplate() + { + if (self::$awsServerConfigNameTemplate == null) { + self::$awsServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/awsServerConfig'); + } + + return self::$awsServerConfigNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'awsCluster' => self::getAwsClusterNameTemplate(), + 'awsNodePool' => self::getAwsNodePoolNameTemplate(), + 'awsServerConfig' => self::getAwsServerConfigNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a aws_cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $awsCluster + * + * @return string The formatted aws_cluster resource. + */ + public static function awsClusterName($project, $location, $awsCluster) + { + return self::getAwsClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'aws_cluster' => $awsCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * aws_node_pool resource. + * + * @param string $project + * @param string $location + * @param string $awsCluster + * @param string $awsNodePool + * + * @return string The formatted aws_node_pool resource. + */ + public static function awsNodePoolName($project, $location, $awsCluster, $awsNodePool) + { + return self::getAwsNodePoolNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'aws_cluster' => $awsCluster, + 'aws_node_pool' => $awsNodePool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * aws_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted aws_server_config resource. + */ + public static function awsServerConfigName($project, $location) + { + return self::getAwsServerConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - awsCluster: projects/{project}/locations/{location}/awsClusters/{aws_cluster} + * - awsNodePool: projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool} + * - awsServerConfig: projects/{project}/locations/{location}/awsServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource on a given Google Cloud Platform project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedParent = $awsClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $awsCluster = new AwsCluster(); + * $awsClusterId = 'aws_cluster_id'; + * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'createAwsCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AwsCluster $awsCluster Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as + * `projects//locations//awsClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAwsCluster($parent, $awsCluster, $awsClusterId, array $optionalArgs = []) + { + $request = new CreateAwsClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAwsCluster($awsCluster); + $request->setAwsClusterId($awsClusterId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAwsCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedParent = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $awsNodePool = new AwsNodePool(); + * $awsNodePoolId = 'aws_node_pool_id'; + * $operationResponse = $awsClustersClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'createAwsNodePool'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AwsNodePool $awsNodePool Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the node + * pool. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAwsNodePool($parent, $awsNodePool, $awsNodePoolId, array $optionalArgs = []) + { + $request = new CreateAwsNodePoolRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAwsNodePool($awsNodePool); + $request->setAwsNodePoolId($awsNodePoolId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAwsNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. + * + * Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $operationResponse = $awsClustersClient->deleteAwsCluster($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->deleteAwsCluster($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'deleteAwsCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @type bool $allowMissing + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * + * Useful for idempotent deletion. + * @type bool $ignoreErrors + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * @type string $etag + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAwsCluster($name, array $optionalArgs = []) + { + $request = new DeleteAwsClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['ignoreErrors'])) { + $request->setIgnoreErrors($optionalArgs['ignoreErrors']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAwsCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + * $operationResponse = $awsClustersClient->deleteAwsNodePool($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->deleteAwsNodePool($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'deleteAwsNodePool'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the node + * pool. + * @type bool $allowMissing + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * + * Useful for idempotent deletion. + * @type bool $ignoreErrors + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * @type string $etag + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAwsNodePool($name, array $optionalArgs = []) + { + $request = new DeleteAwsNodePoolRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['ignoreErrors'])) { + $request->setIgnoreErrors($optionalArgs['ignoreErrors']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAwsNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Generates a short-lived access token to authenticate to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $response = $awsClustersClient->generateAwsAccessToken($formattedAwsCluster); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAwsAccessToken($awsCluster, array $optionalArgs = []) + { + $request = new GenerateAwsAccessTokenRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $requestParamHeaders['aws_cluster'] = $awsCluster; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAwsAccessToken', GenerateAwsAccessTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Generates an access token for a cluster agent. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $subjectToken = 'subject_token'; + * $subjectTokenType = 'subject_token_type'; + * $version = 'version'; + * $response = $awsClustersClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. + * @param string $subjectToken Required. + * @param string $subjectTokenType Required. + * @param string $version Required. + * @param array $optionalArgs { + * Optional. + * + * @type string $nodePoolId + * Optional. + * @type string $grantType + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requestedTokenType + * Optional. + * @type string $options + * Optional. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAwsClusterAgentToken($awsCluster, $subjectToken, $subjectTokenType, $version, array $optionalArgs = []) + { + $request = new GenerateAwsClusterAgentTokenRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $request->setSubjectToken($subjectToken); + $request->setSubjectTokenType($subjectTokenType); + $request->setVersion($version); + $requestParamHeaders['aws_cluster'] = $awsCluster; + if (isset($optionalArgs['nodePoolId'])) { + $request->setNodePoolId($optionalArgs['nodePoolId']); + } + + if (isset($optionalArgs['grantType'])) { + $request->setGrantType($optionalArgs['grantType']); + } + + if (isset($optionalArgs['audience'])) { + $request->setAudience($optionalArgs['audience']); + } + + if (isset($optionalArgs['scope'])) { + $request->setScope($optionalArgs['scope']); + } + + if (isset($optionalArgs['requestedTokenType'])) { + $request->setRequestedTokenType($optionalArgs['requestedTokenType']); + } + + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAwsClusterAgentToken', GenerateAwsClusterAgentTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $response = $awsClustersClient->getAwsCluster($formattedName); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster + * + * @throws ApiException if the remote call fails + */ + public function getAwsCluster($name, array $optionalArgs = []) + { + $request = new GetAwsClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAwsCluster', AwsCluster::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $response = $awsClustersClient->getAwsJsonWebKeys($formattedAwsCluster); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. The AwsCluster, which owns the JsonWebKeys. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys + * + * @throws ApiException if the remote call fails + */ + public function getAwsJsonWebKeys($awsCluster, array $optionalArgs = []) + { + $request = new GetAwsJsonWebKeysRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $requestParamHeaders['aws_cluster'] = $awsCluster; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAwsJsonWebKeys', AwsJsonWebKeys::class, $optionalArgs, $request)->wait(); + } + + /** + * Describes a specific + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + * $response = $awsClustersClient->getAwsNodePool($formattedName); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool + * + * @throws ApiException if the remote call fails + */ + public function getAwsNodePool($name, array $optionalArgs = []) + { + $request = new GetAwsNodePoolRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAwsNodePool', AwsNodePool::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $response = $awsClustersClient->getAwsOpenIdConfig($formattedAwsCluster); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. The AwsCluster, which owns the OIDC discovery document. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig + * + * @throws ApiException if the remote call fails + */ + public function getAwsOpenIdConfig($awsCluster, array $optionalArgs = []) + { + $request = new GetAwsOpenIdConfigRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $requestParamHeaders['aws_cluster'] = $awsCluster; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAwsOpenIdConfig', AwsOpenIdConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns information, such as supported AWS regions and Kubernetes + * versions, on a given Google Cloud location. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); + * $response = $awsClustersClient->getAwsServerConfig($formattedName); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. + * + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsServerConfig + * + * @throws ApiException if the remote call fails + */ + public function getAwsServerConfig($name, array $optionalArgs = []) + { + $request = new GetAwsServerConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAwsServerConfig', AwsServerConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * on a given Google Cloud project and region. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedParent = $awsClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $awsClustersClient->listAwsClusters($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $awsClustersClient->listAwsClusters($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAwsClusters($parent, array $optionalArgs = []) + { + $request = new ListAwsClustersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAwsClusters', $optionalArgs, ListAwsClustersResponse::class, $request); + } + + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedParent = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * // Iterate over pages of elements + * $pagedResponse = $awsClustersClient->listAwsNodePools($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $awsClustersClient->listAwsNodePools($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAwsNodePools($parent, array $optionalArgs = []) + { + $request = new ListAwsNodePoolsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAwsNodePools', $optionalArgs, ListAwsNodePoolsResponse::class, $request); + } + + /** + * Rolls back a previously aborted or failed + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. + * Makes no changes if the last update request successfully finished. + * If an update request is in progress, you cannot rollback the update. + * You must first cancel or let it finish unsuccessfully before you can + * rollback. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + * $operationResponse = $awsClustersClient->rollbackAwsNodePoolUpdate($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->rollbackAwsNodePoolUpdate($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'rollbackAwsNodePoolUpdate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $respectPdb + * Optional. Option for rollback to ignore the PodDisruptionBudget when + * draining the node pool nodes. Default value is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function rollbackAwsNodePoolUpdate($name, array $optionalArgs = []) + { + $request = new RollbackAwsNodePoolUpdateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['respectPdb'])) { + $request->setRespectPdb($optionalArgs['respectPdb']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('RollbackAwsNodePoolUpdate', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $awsCluster = new AwsCluster(); + * $updateMask = new FieldMask(); + * $operationResponse = $awsClustersClient->updateAwsCluster($awsCluster, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->updateAwsCluster($awsCluster, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'updateAwsCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + * + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAwsCluster($awsCluster, $updateMask, array $optionalArgs = []) + { + $request = new UpdateAwsClusterRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $request->setUpdateMask($updateMask); + $requestParamHeaders['aws_cluster.name'] = $awsCluster->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAwsCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $awsNodePool = new AwsNodePool(); + * $updateMask = new FieldMask(); + * $operationResponse = $awsClustersClient->updateAwsNodePool($awsNodePool, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->updateAwsNodePool($awsNodePool, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'updateAwsNodePool'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + * + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but don't actually update the node pool. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAwsNodePool($awsNodePool, $updateMask, array $optionalArgs = []) + { + $request = new UpdateAwsNodePoolRequest(); + $requestParamHeaders = []; + $request->setAwsNodePool($awsNodePool); + $request->setUpdateMask($updateMask); + $requestParamHeaders['aws_node_pool.name'] = $awsNodePool->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAwsNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php new file mode 100644 index 000000000000..396cd65f9fd1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php @@ -0,0 +1,1890 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $azureClient = new AzureClient(); + * $azureClientId = 'azure_client_id'; + * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureClient'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\GkeMultiCloud\V1\Client\AzureClustersClient}. + */ +class AzureClustersGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AzureClusters'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $azureClientNameTemplate; + + private static $azureClusterNameTemplate; + + private static $azureNodePoolNameTemplate; + + private static $azureServerConfigNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/azure_clusters_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/azure_clusters_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/azure_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/azure_clusters_rest_client_config.php', + ], + ], + ]; + } + + private static function getAzureClientNameTemplate() + { + if (self::$azureClientNameTemplate == null) { + self::$azureClientNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureClients/{azure_client}'); + } + + return self::$azureClientNameTemplate; + } + + private static function getAzureClusterNameTemplate() + { + if (self::$azureClusterNameTemplate == null) { + self::$azureClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureClusters/{azure_cluster}'); + } + + return self::$azureClusterNameTemplate; + } + + private static function getAzureNodePoolNameTemplate() + { + if (self::$azureNodePoolNameTemplate == null) { + self::$azureNodePoolNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}'); + } + + return self::$azureNodePoolNameTemplate; + } + + private static function getAzureServerConfigNameTemplate() + { + if (self::$azureServerConfigNameTemplate == null) { + self::$azureServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureServerConfig'); + } + + return self::$azureServerConfigNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'azureClient' => self::getAzureClientNameTemplate(), + 'azureCluster' => self::getAzureClusterNameTemplate(), + 'azureNodePool' => self::getAzureNodePoolNameTemplate(), + 'azureServerConfig' => self::getAzureServerConfigNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a azure_client + * resource. + * + * @param string $project + * @param string $location + * @param string $azureClient + * + * @return string The formatted azure_client resource. + */ + public static function azureClientName($project, $location, $azureClient) + { + return self::getAzureClientNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'azure_client' => $azureClient, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * azure_cluster resource. + * + * @param string $project + * @param string $location + * @param string $azureCluster + * + * @return string The formatted azure_cluster resource. + */ + public static function azureClusterName($project, $location, $azureCluster) + { + return self::getAzureClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'azure_cluster' => $azureCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * azure_node_pool resource. + * + * @param string $project + * @param string $location + * @param string $azureCluster + * @param string $azureNodePool + * + * @return string The formatted azure_node_pool resource. + */ + public static function azureNodePoolName($project, $location, $azureCluster, $azureNodePool) + { + return self::getAzureNodePoolNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'azure_cluster' => $azureCluster, + 'azure_node_pool' => $azureNodePool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * azure_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted azure_server_config resource. + */ + public static function azureServerConfigName($project, $location) + { + return self::getAzureServerConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - azureClient: projects/{project}/locations/{location}/azureClients/{azure_client} + * - azureCluster: projects/{project}/locations/{location}/azureClusters/{azure_cluster} + * - azureNodePool: projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool} + * - azureServerConfig: projects/{project}/locations/{location}/azureServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource on a given Google Cloud project and region. + * + * `AzureClient` resources hold client authentication + * information needed by the Anthos Multicloud API to manage Azure resources + * on your Azure subscription on your behalf. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $azureClient = new AzureClient(); + * $azureClientId = 'azure_client_id'; + * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureClient'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AzureClient $azureClient Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as + * `projects//locations//azureClients/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the client. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAzureClient($parent, $azureClient, $azureClientId, array $optionalArgs = []) + { + $request = new CreateAzureClientRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAzureClient($azureClient); + $request->setAzureClientId($azureClientId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAzureClient', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource on a given Google Cloud Platform project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $azureCluster = new AzureCluster(); + * $azureClusterId = 'azure_cluster_id'; + * $operationResponse = $azureClustersClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AzureCluster $azureCluster Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as + * `projects//locations//azureClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAzureCluster($parent, $azureCluster, $azureClusterId, array $optionalArgs = []) + { + $request = new CreateAzureClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAzureCluster($azureCluster); + $request->setAzureClusterId($azureClusterId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAzureCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + * attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedParent = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $azureNodePool = new AzureNodePool(); + * $azureNodePoolId = 'azure_node_pool_id'; + * $operationResponse = $azureClustersClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureNodePool'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AzureNodePool $azureNodePool Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the node + * pool. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAzureNodePool($parent, $azureNodePool, $azureNodePoolId, array $optionalArgs = []) + { + $request = new CreateAzureNodePoolRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAzureNodePool($azureNodePool); + $request->setAzureNodePoolId($azureNodePoolId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAzureNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource. + * + * If the client is used by one or more clusters, deletion will + * fail and a `FAILED_PRECONDITION` error will be returned. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + * $operationResponse = $azureClustersClient->deleteAzureClient($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->deleteAzureClient($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'deleteAzureClient'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $allowMissing + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * + * Useful for idempotent deletion. + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAzureClient($name, array $optionalArgs = []) + { + $request = new DeleteAzureClientRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAzureClient', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + * Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $operationResponse = $azureClustersClient->deleteAzureCluster($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->deleteAzureCluster($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'deleteAzureCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $allowMissing + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. + * + * Useful for idempotent deletion. + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @type string $etag + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAzureCluster($name, array $optionalArgs = []) + { + $request = new DeleteAzureClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAzureCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + * $operationResponse = $azureClustersClient->deleteAzureNodePool($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->deleteAzureNodePool($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'deleteAzureNodePool'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the node + * pool. + * @type bool $allowMissing + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * + * Useful for idempotent deletion. + * @type string $etag + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAzureNodePool($name, array $optionalArgs = []) + { + $request = new DeleteAzureNodePoolRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAzureNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Generates a short-lived access token to authenticate to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $response = $azureClustersClient->generateAzureAccessToken($formattedAzureCluster); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAzureAccessToken($azureCluster, array $optionalArgs = []) + { + $request = new GenerateAzureAccessTokenRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $requestParamHeaders['azure_cluster'] = $azureCluster; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAzureAccessToken', GenerateAzureAccessTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Generates an access token for a cluster agent. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $subjectToken = 'subject_token'; + * $subjectTokenType = 'subject_token_type'; + * $version = 'version'; + * $response = $azureClustersClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. + * @param string $subjectToken Required. + * @param string $subjectTokenType Required. + * @param string $version Required. + * @param array $optionalArgs { + * Optional. + * + * @type string $nodePoolId + * Optional. + * @type string $grantType + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requestedTokenType + * Optional. + * @type string $options + * Optional. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAzureClusterAgentToken($azureCluster, $subjectToken, $subjectTokenType, $version, array $optionalArgs = []) + { + $request = new GenerateAzureClusterAgentTokenRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $request->setSubjectToken($subjectToken); + $request->setSubjectTokenType($subjectTokenType); + $request->setVersion($version); + $requestParamHeaders['azure_cluster'] = $azureCluster; + if (isset($optionalArgs['nodePoolId'])) { + $request->setNodePoolId($optionalArgs['nodePoolId']); + } + + if (isset($optionalArgs['grantType'])) { + $request->setGrantType($optionalArgs['grantType']); + } + + if (isset($optionalArgs['audience'])) { + $request->setAudience($optionalArgs['audience']); + } + + if (isset($optionalArgs['scope'])) { + $request->setScope($optionalArgs['scope']); + } + + if (isset($optionalArgs['requestedTokenType'])) { + $request->setRequestedTokenType($optionalArgs['requestedTokenType']); + } + + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAzureClusterAgentToken', GenerateAzureClusterAgentTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Describes a specific + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + * $response = $azureClustersClient->getAzureClient($formattedName); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as + * `projects//locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureClient + * + * @throws ApiException if the remote call fails + */ + public function getAzureClient($name, array $optionalArgs = []) + { + $request = new GetAzureClientRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAzureClient', AzureClient::class, $optionalArgs, $request)->wait(); + } + + /** + * Describes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $response = $azureClustersClient->getAzureCluster($formattedName); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster + * + * @throws ApiException if the remote call fails + */ + public function getAzureCluster($name, array $optionalArgs = []) + { + $request = new GetAzureClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAzureCluster', AzureCluster::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $response = $azureClustersClient->getAzureJsonWebKeys($formattedAzureCluster); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys + * + * @throws ApiException if the remote call fails + */ + public function getAzureJsonWebKeys($azureCluster, array $optionalArgs = []) + { + $request = new GetAzureJsonWebKeysRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $requestParamHeaders['azure_cluster'] = $azureCluster; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAzureJsonWebKeys', AzureJsonWebKeys::class, $optionalArgs, $request)->wait(); + } + + /** + * Describes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + * $response = $azureClustersClient->getAzureNodePool($formattedName); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. + * + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool + * + * @throws ApiException if the remote call fails + */ + public function getAzureNodePool($name, array $optionalArgs = []) + { + $request = new GetAzureNodePoolRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAzureNodePool', AzureNodePool::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $response = $azureClustersClient->getAzureOpenIdConfig($formattedAzureCluster); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig + * + * @throws ApiException if the remote call fails + */ + public function getAzureOpenIdConfig($azureCluster, array $optionalArgs = []) + { + $request = new GetAzureOpenIdConfigRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $requestParamHeaders['azure_cluster'] = $azureCluster; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAzureOpenIdConfig', AzureOpenIdConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns information, such as supported Azure regions and Kubernetes + * versions, on a given Google Cloud location. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedName = $azureClustersClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); + * $response = $azureClustersClient->getAzureServerConfig($formattedName); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. + * + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureServerConfig + * + * @throws ApiException if the remote call fails + */ + public function getAzureServerConfig($name, array $optionalArgs = []) + { + $request = new GetAzureServerConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAzureServerConfig', AzureServerConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources on a given Google Cloud project and region. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $azureClustersClient->listAzureClients($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $azureClustersClient->listAzureClients($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAzureClients($parent, array $optionalArgs = []) + { + $request = new ListAzureClientsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAzureClients', $optionalArgs, ListAzureClientsResponse::class, $request); + } + + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources on a given Google Cloud project and region. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $azureClustersClient->listAzureClusters($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $azureClustersClient->listAzureClusters($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud Platform resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAzureClusters($parent, array $optionalArgs = []) + { + $request = new ListAzureClustersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAzureClusters', $optionalArgs, ListAzureClustersResponse::class, $request); + } + + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedParent = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * // Iterate over pages of elements + * $pagedResponse = $azureClustersClient->listAzureNodePools($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $azureClustersClient->listAzureNodePools($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAzureNodePools($parent, array $optionalArgs = []) + { + $request = new ListAzureNodePoolsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAzureNodePools', $optionalArgs, ListAzureNodePoolsResponse::class, $request); + } + + /** + * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $azureCluster = new AzureCluster(); + * $updateMask = new FieldMask(); + * $operationResponse = $azureClustersClient->updateAzureCluster($azureCluster, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->updateAzureCluster($azureCluster, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'updateAzureCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + * + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `control_plane.root_volume.size_gib`. + * * `azure_services_authentication`. + * * `azure_services_authentication.tenant_id`. + * * `azure_services_authentication.application_id`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAzureCluster($azureCluster, $updateMask, array $optionalArgs = []) + { + $request = new UpdateAzureClusterRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $request->setUpdateMask($updateMask); + $requestParamHeaders['azure_cluster.name'] = $azureCluster->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAzureCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $azureNodePool = new AzureNodePool(); + * $updateMask = new FieldMask(); + * $operationResponse = $azureClustersClient->updateAzureNodePool($azureNodePool, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $azureClustersClient->updateAzureNodePool($azureNodePool, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'updateAzureNodePool'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + * + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but don't actually update the node pool. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAzureNodePool($azureNodePool, $updateMask, array $optionalArgs = []) + { + $request = new UpdateAzureNodePoolRequest(); + $requestParamHeaders = []; + $request->setAzureNodePool($azureNodePool); + $request->setUpdateMask($updateMask); + $requestParamHeaders['azure_node_pool.name'] = $azureNodePool->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAzureNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..511a1a11b279 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json @@ -0,0 +1,256 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.gkemulticloud.v1", + "libraryPackage": "Google\\Cloud\\GkeMultiCloud\\V1", + "services": { + "AttachedClusters": { + "clients": { + "grpc": { + "libraryClient": "AttachedClustersGapicClient", + "rpcs": { + "CreateAttachedCluster": { + "methods": [ + "createAttachedCluster" + ] + }, + "DeleteAttachedCluster": { + "methods": [ + "deleteAttachedCluster" + ] + }, + "GenerateAttachedClusterAgentToken": { + "methods": [ + "generateAttachedClusterAgentToken" + ] + }, + "GenerateAttachedClusterInstallManifest": { + "methods": [ + "generateAttachedClusterInstallManifest" + ] + }, + "GetAttachedCluster": { + "methods": [ + "getAttachedCluster" + ] + }, + "GetAttachedServerConfig": { + "methods": [ + "getAttachedServerConfig" + ] + }, + "ImportAttachedCluster": { + "methods": [ + "importAttachedCluster" + ] + }, + "ListAttachedClusters": { + "methods": [ + "listAttachedClusters" + ] + }, + "UpdateAttachedCluster": { + "methods": [ + "updateAttachedCluster" + ] + } + } + } + } + }, + "AwsClusters": { + "clients": { + "grpc": { + "libraryClient": "AwsClustersGapicClient", + "rpcs": { + "CreateAwsCluster": { + "methods": [ + "createAwsCluster" + ] + }, + "CreateAwsNodePool": { + "methods": [ + "createAwsNodePool" + ] + }, + "DeleteAwsCluster": { + "methods": [ + "deleteAwsCluster" + ] + }, + "DeleteAwsNodePool": { + "methods": [ + "deleteAwsNodePool" + ] + }, + "GenerateAwsAccessToken": { + "methods": [ + "generateAwsAccessToken" + ] + }, + "GenerateAwsClusterAgentToken": { + "methods": [ + "generateAwsClusterAgentToken" + ] + }, + "GetAwsCluster": { + "methods": [ + "getAwsCluster" + ] + }, + "GetAwsJsonWebKeys": { + "methods": [ + "getAwsJsonWebKeys" + ] + }, + "GetAwsNodePool": { + "methods": [ + "getAwsNodePool" + ] + }, + "GetAwsOpenIdConfig": { + "methods": [ + "getAwsOpenIdConfig" + ] + }, + "GetAwsServerConfig": { + "methods": [ + "getAwsServerConfig" + ] + }, + "ListAwsClusters": { + "methods": [ + "listAwsClusters" + ] + }, + "ListAwsNodePools": { + "methods": [ + "listAwsNodePools" + ] + }, + "RollbackAwsNodePoolUpdate": { + "methods": [ + "rollbackAwsNodePoolUpdate" + ] + }, + "UpdateAwsCluster": { + "methods": [ + "updateAwsCluster" + ] + }, + "UpdateAwsNodePool": { + "methods": [ + "updateAwsNodePool" + ] + } + } + } + } + }, + "AzureClusters": { + "clients": { + "grpc": { + "libraryClient": "AzureClustersGapicClient", + "rpcs": { + "CreateAzureClient": { + "methods": [ + "createAzureClient" + ] + }, + "CreateAzureCluster": { + "methods": [ + "createAzureCluster" + ] + }, + "CreateAzureNodePool": { + "methods": [ + "createAzureNodePool" + ] + }, + "DeleteAzureClient": { + "methods": [ + "deleteAzureClient" + ] + }, + "DeleteAzureCluster": { + "methods": [ + "deleteAzureCluster" + ] + }, + "DeleteAzureNodePool": { + "methods": [ + "deleteAzureNodePool" + ] + }, + "GenerateAzureAccessToken": { + "methods": [ + "generateAzureAccessToken" + ] + }, + "GenerateAzureClusterAgentToken": { + "methods": [ + "generateAzureClusterAgentToken" + ] + }, + "GetAzureClient": { + "methods": [ + "getAzureClient" + ] + }, + "GetAzureCluster": { + "methods": [ + "getAzureCluster" + ] + }, + "GetAzureJsonWebKeys": { + "methods": [ + "getAzureJsonWebKeys" + ] + }, + "GetAzureNodePool": { + "methods": [ + "getAzureNodePool" + ] + }, + "GetAzureOpenIdConfig": { + "methods": [ + "getAzureOpenIdConfig" + ] + }, + "GetAzureServerConfig": { + "methods": [ + "getAzureServerConfig" + ] + }, + "ListAzureClients": { + "methods": [ + "listAzureClients" + ] + }, + "ListAzureClusters": { + "methods": [ + "listAzureClusters" + ] + }, + "ListAzureNodePools": { + "methods": [ + "listAzureNodePools" + ] + }, + "UpdateAzureCluster": { + "methods": [ + "updateAzureCluster" + ] + }, + "UpdateAzureNodePool": { + "methods": [ + "updateAzureNodePool" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json new file mode 100644 index 000000000000..54292e4dc542 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.gkemulticloud.v1.AttachedClusters": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAttachedClusterAgentToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateAttachedClusterInstallManifest": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAttachedServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListAttachedClusters": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php new file mode 100644 index 000000000000..a128879d6ff7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php @@ -0,0 +1,158 @@ + [ + 'google.cloud.gkemulticloud.v1.AttachedClusters' => [ + 'CreateAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'attached_cluster.name', + 'fieldAccessors' => [ + 'getAttachedCluster', + 'getName', + ], + ], + ], + ], + 'GenerateAttachedClusterAgentToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'attached_cluster', + 'fieldAccessors' => [ + 'getAttachedCluster', + ], + ], + ], + ], + 'GenerateAttachedClusterInstallManifest' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetAttachedCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AttachedCluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAttachedServerConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachedClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachedClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachedCluster' => 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}', + 'attachedServerConfig' => 'projects/{project}/locations/{location}/attachedServerConfig', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php new file mode 100644 index 000000000000..364619157fb7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php @@ -0,0 +1,165 @@ + [ + 'google.cloud.gkemulticloud.v1.AttachedClusters' => [ + 'CreateAttachedCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters', + 'body' => 'attached_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'attached_cluster_id', + ], + ], + 'DeleteAttachedCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateAttachedClusterAgentToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken', + 'body' => '*', + 'placeholders' => [ + 'attached_cluster' => [ + 'getters' => [ + 'getAttachedCluster', + ], + ], + ], + ], + 'GenerateAttachedClusterInstallManifest' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetAttachedCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAttachedServerConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedServerConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportAttachedCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAttachedClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAttachedCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}', + 'body' => 'attached_cluster', + 'placeholders' => [ + 'attached_cluster.name' => [ + 'getters' => [ + 'getAttachedCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json new file mode 100644 index 000000000000..25741e0c9cd6 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json @@ -0,0 +1,124 @@ +{ + "interfaces": { + "google.cloud.gkemulticloud.v1.AwsClusters": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAwsAccessToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateAwsClusterAgentToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAwsJsonWebKeys": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAwsOpenIdConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAwsServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAwsClusters": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAwsNodePools": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RollbackAwsNodePoolUpdate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php new file mode 100644 index 000000000000..03604870910b --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php @@ -0,0 +1,273 @@ + [ + 'google.cloud.gkemulticloud.v1.AwsClusters' => [ + 'CreateAwsCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAwsNodePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAwsCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAwsNodePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RollbackAwsNodePoolUpdate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAwsCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster.name', + 'fieldAccessors' => [ + 'getAwsCluster', + 'getName', + ], + ], + ], + ], + 'UpdateAwsNodePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'aws_node_pool.name', + 'fieldAccessors' => [ + 'getAwsNodePool', + 'getName', + ], + ], + ], + ], + 'GenerateAwsAccessToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GenerateAwsClusterAgentToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GetAwsCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsCluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAwsJsonWebKeys' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GetAwsNodePool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsNodePool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAwsOpenIdConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GetAwsServerConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsServerConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAwsClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAwsClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAwsNodePools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAwsNodePools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'awsCluster' => 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}', + 'awsNodePool' => 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}', + 'awsServerConfig' => 'projects/{project}/locations/{location}/awsServerConfig', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php new file mode 100644 index 000000000000..282fd1407fc1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php @@ -0,0 +1,251 @@ + [ + 'google.cloud.gkemulticloud.v1.AwsClusters' => [ + 'CreateAwsCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/awsClusters', + 'body' => 'aws_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'aws_cluster_id', + ], + ], + 'CreateAwsNodePool' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools', + 'body' => 'aws_node_pool', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'aws_node_pool_id', + ], + ], + 'DeleteAwsCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAwsNodePool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateAwsAccessToken' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GenerateAwsClusterAgentToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken', + 'body' => '*', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GetAwsCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAwsJsonWebKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwks', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GetAwsNodePool' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAwsOpenIdConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configuration', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], + 'GetAwsServerConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsServerConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAwsClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/awsClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAwsNodePools' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RollbackAwsNodePoolUpdate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAwsCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}', + 'body' => 'aws_cluster', + 'placeholders' => [ + 'aws_cluster.name' => [ + 'getters' => [ + 'getAwsCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateAwsNodePool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', + 'body' => 'aws_node_pool', + 'placeholders' => [ + 'aws_node_pool.name' => [ + 'getters' => [ + 'getAwsNodePool', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json new file mode 100644 index 000000000000..4b2a2924b13c --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json @@ -0,0 +1,139 @@ +{ + "interfaces": { + "google.cloud.gkemulticloud.v1.AzureClusters": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAzureClient": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAzureClient": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAzureAccessToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateAzureClusterAgentToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAzureClient": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAzureJsonWebKeys": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAzureOpenIdConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAzureServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAzureClients": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAzureClusters": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAzureNodePools": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php new file mode 100644 index 000000000000..e50260fa88ca --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php @@ -0,0 +1,325 @@ + [ + 'google.cloud.gkemulticloud.v1.AzureClusters' => [ + 'CreateAzureClient' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureClient', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAzureCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAzureNodePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureNodePool', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAzureClient' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAzureCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAzureNodePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAzureCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster.name', + 'fieldAccessors' => [ + 'getAzureCluster', + 'getName', + ], + ], + ], + ], + 'UpdateAzureNodePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureNodePool', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'azure_node_pool.name', + 'fieldAccessors' => [ + 'getAzureNodePool', + 'getName', + ], + ], + ], + ], + 'GenerateAzureAccessToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GenerateAzureClusterAgentToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GetAzureClient' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureClient', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAzureCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureCluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAzureJsonWebKeys' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GetAzureNodePool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureNodePool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAzureOpenIdConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GetAzureServerConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureServerConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAzureClients' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAzureClients', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAzureClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAzureClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAzureNodePools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAzureNodePools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'azureClient' => 'projects/{project}/locations/{location}/azureClients/{azure_client}', + 'azureCluster' => 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}', + 'azureNodePool' => 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}', + 'azureServerConfig' => 'projects/{project}/locations/{location}/azureServerConfig', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php new file mode 100644 index 000000000000..69cbb41b0927 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php @@ -0,0 +1,287 @@ + [ + 'google.cloud.gkemulticloud.v1.AzureClusters' => [ + 'CreateAzureClient' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClients', + 'body' => 'azure_client', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'azure_client_id', + ], + ], + 'CreateAzureCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClusters', + 'body' => 'azure_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'azure_cluster_id', + ], + ], + 'CreateAzureNodePool' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools', + 'body' => 'azure_node_pool', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'azure_node_pool_id', + ], + ], + 'DeleteAzureClient' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAzureCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAzureNodePool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateAzureAccessToken' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GenerateAzureClusterAgentToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken', + 'body' => '*', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GetAzureClient' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAzureCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAzureJsonWebKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwks', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GetAzureNodePool' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAzureOpenIdConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configuration', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], + 'GetAzureServerConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureServerConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAzureClients' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClients', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAzureClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAzureNodePools' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAzureCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}', + 'body' => 'azure_cluster', + 'placeholders' => [ + 'azure_cluster.name' => [ + 'getters' => [ + 'getAzureCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateAzureNodePool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', + 'body' => 'azure_node_pool', + 'placeholders' => [ + 'azure_node_pool.name' => [ + 'getters' => [ + 'getAzureNodePool', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php new file mode 100644 index 000000000000..e7c525d0d211 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php @@ -0,0 +1,1007 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AttachedClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AttachedClustersClient($options); + } + + /** @test */ + public function createAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $response = $gapicClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $response = $gapicClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $response = $gapicClient->deleteAttachedCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $response = $gapicClient->deleteAttachedCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $response = $gapicClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + try { + $gapicClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterInstallManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $manifest = 'manifest130625071'; + $expectedResponse = new GenerateAttachedClusterInstallManifestResponse(); + $expectedResponse->setManifest($manifest); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = 'attachedClusterId-249426181'; + $platformVersion = 'platformVersion1813514508'; + $response = $gapicClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $actualValue = $actualRequestObject->getPlatformVersion(); + $this->assertProtobufEquals($platformVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterInstallManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = 'attachedClusterId-249426181'; + $platformVersion = 'platformVersion1813514508'; + try { + $gapicClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $response = $gapicClient->getAttachedCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + try { + $gapicClient->getAttachedCluster($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AttachedServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getAttachedServerConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->getAttachedServerConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion2 = 'platformVersion2-969276993'; + $distribution2 = 'distribution21357826359'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion2); + $expectedResponse->setDistribution($distribution2); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = 'fleetMembership1817977703'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $response = $gapicClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFleetMembership(); + $this->assertProtobufEquals($fleetMembership, $actualValue); + $actualValue = $actualApiRequestObject->getPlatformVersion(); + $this->assertProtobufEquals($platformVersion, $actualValue); + $actualValue = $actualApiRequestObject->getDistribution(); + $this->assertProtobufEquals($distribution, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = 'fleetMembership1817977703'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $response = $gapicClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listAttachedClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachedClustersElement = new AttachedCluster(); + $attachedClusters = [ + $attachedClustersElement, + ]; + $expectedResponse = new ListAttachedClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachedClusters($attachedClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listAttachedClusters($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachedClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachedClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listAttachedClusters($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAttachedCluster($attachedCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAttachedCluster($attachedCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php new file mode 100644 index 000000000000..d09c68322f4f --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php @@ -0,0 +1,1824 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AwsClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AwsClustersClient($options); + } + + /** @test */ + public function createAwsClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $awsClusterId = 'awsClusterId938438658'; + $response = $gapicClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAwsCluster(); + $this->assertProtobufEquals($awsCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAwsClusterId(); + $this->assertProtobufEquals($awsClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $awsClusterId = 'awsClusterId938438658'; + $response = $gapicClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAwsNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $awsNodePoolId = 'awsNodePoolId1958033635'; + $response = $gapicClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAwsNodePool(); + $this->assertProtobufEquals($awsNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getAwsNodePoolId(); + $this->assertProtobufEquals($awsNodePoolId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $awsNodePoolId = 'awsNodePoolId1958033635'; + $response = $gapicClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->deleteAwsCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->deleteAwsCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAwsNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->deleteAwsNodePool($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->deleteAwsNodePool($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAwsAccessTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expectedResponse = new GenerateAwsAccessTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->generateAwsAccessToken($formattedAwsCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsAccessToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsAccessTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->generateAwsAccessToken($formattedAwsCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $response = $gapicClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + try { + $gapicClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->getAwsCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->getAwsCluster($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AwsJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->getAwsJsonWebKeys($formattedAwsCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->getAwsJsonWebKeys($formattedAwsCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsNodePoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->getAwsNodePool($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsNodePool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsNodePoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + try { + $gapicClient->getAwsNodePool($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AwsOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->getAwsOpenIdConfig($formattedAwsCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->getAwsOpenIdConfig($formattedAwsCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AwsServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getAwsServerConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->getAwsServerConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $awsClustersElement = new AwsCluster(); + $awsClusters = [ + $awsClustersElement, + ]; + $expectedResponse = new ListAwsClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAwsClusters($awsClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listAwsClusters($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAwsClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listAwsClusters($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsNodePoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $awsNodePoolsElement = new AwsNodePool(); + $awsNodePools = [ + $awsNodePoolsElement, + ]; + $expectedResponse = new ListAwsNodePoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAwsNodePools($awsNodePools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->listAwsNodePools($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAwsNodePools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsNodePools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsNodePoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->listAwsNodePools($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackAwsNodePoolUpdateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->rollbackAwsNodePoolUpdate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackAwsNodePoolUpdateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->rollbackAwsNodePoolUpdate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAwsCluster($awsCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAwsCluster(); + $this->assertProtobufEquals($awsCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAwsCluster($awsCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAwsNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAwsNodePool($awsNodePool, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAwsNodePool(); + $this->assertProtobufEquals($awsNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAwsNodePool($awsNodePool, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php new file mode 100644 index 000000000000..e7886b33dcf7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php @@ -0,0 +1,2065 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AzureClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AzureClustersClient($options); + } + + /** @test */ + public function createAzureClientTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $tenantId = 'tenantId-1852780336'; + $applicationId = 'applicationId-1287148950'; + $reconciling = false; + $pemCertificate = 'pemCertificate1234463984'; + $uid = 'uid115792'; + $expectedResponse = new AzureClient(); + $expectedResponse->setName($name); + $expectedResponse->setTenantId($tenantId); + $expectedResponse->setApplicationId($applicationId); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setPemCertificate($pemCertificate); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureClientTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureClient = new AzureClient(); + $azureClientTenantId = 'azureClientTenantId-567307073'; + $azureClient->setTenantId($azureClientTenantId); + $azureClientApplicationId = 'azureClientApplicationId264838513'; + $azureClient->setApplicationId($azureClientApplicationId); + $azureClientId = 'azureClientId315645023'; + $response = $gapicClient->createAzureClient($formattedParent, $azureClient, $azureClientId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClient(); + $this->assertProtobufEquals($azureClient, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClientId(); + $this->assertProtobufEquals($azureClientId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClientExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureClient = new AzureClient(); + $azureClientTenantId = 'azureClientTenantId-567307073'; + $azureClient->setTenantId($azureClientTenantId); + $azureClientApplicationId = 'azureClientApplicationId264838513'; + $azureClient->setApplicationId($azureClientApplicationId); + $azureClientId = 'azureClientId315645023'; + $response = $gapicClient->createAzureClient($formattedParent, $azureClient, $azureClientId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $azureRegion = 'azureRegion-253373788'; + $resourceGroupId = 'resourceGroupId-1092054036'; + $azureClient = 'azureClient-676290693'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AzureCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAzureRegion($azureRegion); + $expectedResponse->setResourceGroupId($resourceGroupId); + $expectedResponse->setAzureClient($azureClient); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $azureClusterId = 'azureClusterId332577072'; + $response = $gapicClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureCluster(); + $this->assertProtobufEquals($azureCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClusterId(); + $this->assertProtobufEquals($azureClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $azureClusterId = 'azureClusterId332577072'; + $response = $gapicClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $azureAvailabilityZone = 'azureAvailabilityZone541920864'; + $expectedResponse = new AzureNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $azureNodePoolId = 'azureNodePoolId-454365551'; + $response = $gapicClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureNodePool(); + $this->assertProtobufEquals($azureNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getAzureNodePoolId(); + $this->assertProtobufEquals($azureNodePoolId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $azureNodePoolId = 'azureNodePoolId-454365551'; + $response = $gapicClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClientTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAzureClientTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $response = $gapicClient->deleteAzureClient($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureClient', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClientExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $response = $gapicClient->deleteAzureClient($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAzureClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->deleteAzureCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->deleteAzureCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAzureNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $response = $gapicClient->deleteAzureNodePool($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $response = $gapicClient->deleteAzureNodePool($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAzureAccessTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expectedResponse = new GenerateAzureAccessTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->generateAzureAccessToken($formattedAzureCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureAccessToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureAccessTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->generateAzureAccessToken($formattedAzureCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $response = $gapicClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + try { + $gapicClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClientTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $tenantId = 'tenantId-1852780336'; + $applicationId = 'applicationId-1287148950'; + $reconciling = false; + $pemCertificate = 'pemCertificate1234463984'; + $uid = 'uid115792'; + $expectedResponse = new AzureClient(); + $expectedResponse->setName($name2); + $expectedResponse->setTenantId($tenantId); + $expectedResponse->setApplicationId($applicationId); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setPemCertificate($pemCertificate); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $response = $gapicClient->getAzureClient($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureClient', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClientExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + try { + $gapicClient->getAzureClient($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $azureRegion = 'azureRegion-253373788'; + $resourceGroupId = 'resourceGroupId-1092054036'; + $azureClient = 'azureClient-676290693'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AzureCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAzureRegion($azureRegion); + $expectedResponse->setResourceGroupId($resourceGroupId); + $expectedResponse->setAzureClient($azureClient); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->getAzureCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->getAzureCluster($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AzureJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->getAzureJsonWebKeys($formattedAzureCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->getAzureJsonWebKeys($formattedAzureCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureNodePoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $azureAvailabilityZone = 'azureAvailabilityZone541920864'; + $expectedResponse = new AzureNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $response = $gapicClient->getAzureNodePool($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureNodePool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureNodePoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + try { + $gapicClient->getAzureNodePool($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AzureOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->getAzureOpenIdConfig($formattedAzureCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->getAzureOpenIdConfig($formattedAzureCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AzureServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getAzureServerConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->getAzureServerConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClientsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $azureClientsElement = new AzureClient(); + $azureClients = [ + $azureClientsElement, + ]; + $expectedResponse = new ListAzureClientsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAzureClients($azureClients); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listAzureClients($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAzureClients()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClients', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClientsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listAzureClients($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $azureClustersElement = new AzureCluster(); + $azureClusters = [ + $azureClustersElement, + ]; + $expectedResponse = new ListAzureClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAzureClusters($azureClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listAzureClusters($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAzureClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listAzureClusters($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureNodePoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $azureNodePoolsElement = new AzureNodePool(); + $azureNodePools = [ + $azureNodePoolsElement, + ]; + $expectedResponse = new ListAzureNodePoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAzureNodePools($azureNodePools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->listAzureNodePools($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAzureNodePools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureNodePools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureNodePoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->listAzureNodePools($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAzureClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $azureRegion = 'azureRegion-253373788'; + $resourceGroupId = 'resourceGroupId-1092054036'; + $azureClient = 'azureClient-676290693'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AzureCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAzureRegion($azureRegion); + $expectedResponse->setResourceGroupId($resourceGroupId); + $expectedResponse->setAzureClient($azureClient); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAzureClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAzureCluster($azureCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAzureCluster(); + $this->assertProtobufEquals($azureCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAzureClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAzureCluster($azureCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAzureNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $azureAvailabilityZone = 'azureAvailabilityZone541920864'; + $expectedResponse = new AzureNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAzureNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAzureNodePool($azureNodePool, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAzureNodePool(); + $this->assertProtobufEquals($azureNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAzureNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAzureNodePool($azureNodePool, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php new file mode 100644 index 000000000000..67d612dd5cc3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php @@ -0,0 +1,1174 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AttachedClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AttachedClustersClient($options); + } + + /** @test */ + public function createAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $request = (new CreateAttachedClusterRequest()) + ->setParent($formattedParent) + ->setAttachedCluster($attachedCluster) + ->setAttachedClusterId($attachedClusterId); + $response = $gapicClient->createAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $request = (new CreateAttachedClusterRequest()) + ->setParent($formattedParent) + ->setAttachedCluster($attachedCluster) + ->setAttachedClusterId($attachedClusterId); + $response = $gapicClient->createAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $request = (new DeleteAttachedClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $request = (new DeleteAttachedClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAttachedClusterAgentTokenRequest()) + ->setAttachedCluster($formattedAttachedCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + $response = $gapicClient->generateAttachedClusterAgentToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAttachedClusterAgentTokenRequest()) + ->setAttachedCluster($formattedAttachedCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + try { + $gapicClient->generateAttachedClusterAgentToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterInstallManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $manifest = 'manifest130625071'; + $expectedResponse = new GenerateAttachedClusterInstallManifestResponse(); + $expectedResponse->setManifest($manifest); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = 'attachedClusterId-249426181'; + $platformVersion = 'platformVersion1813514508'; + $request = (new GenerateAttachedClusterInstallManifestRequest()) + ->setParent($formattedParent) + ->setAttachedClusterId($attachedClusterId) + ->setPlatformVersion($platformVersion); + $response = $gapicClient->generateAttachedClusterInstallManifest($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $actualValue = $actualRequestObject->getPlatformVersion(); + $this->assertProtobufEquals($platformVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterInstallManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = 'attachedClusterId-249426181'; + $platformVersion = 'platformVersion1813514508'; + $request = (new GenerateAttachedClusterInstallManifestRequest()) + ->setParent($formattedParent) + ->setAttachedClusterId($attachedClusterId) + ->setPlatformVersion($platformVersion); + try { + $gapicClient->generateAttachedClusterInstallManifest($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $request = (new GetAttachedClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachedCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $request = (new GetAttachedClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttachedCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AttachedServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetAttachedServerConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachedServerConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetAttachedServerConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttachedServerConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion2 = 'platformVersion2-969276993'; + $distribution2 = 'distribution21357826359'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion2); + $expectedResponse->setDistribution($distribution2); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = 'fleetMembership1817977703'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $request = (new ImportAttachedClusterRequest()) + ->setParent($formattedParent) + ->setFleetMembership($fleetMembership) + ->setPlatformVersion($platformVersion) + ->setDistribution($distribution); + $response = $gapicClient->importAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFleetMembership(); + $this->assertProtobufEquals($fleetMembership, $actualValue); + $actualValue = $actualApiRequestObject->getPlatformVersion(); + $this->assertProtobufEquals($platformVersion, $actualValue); + $actualValue = $actualApiRequestObject->getDistribution(); + $this->assertProtobufEquals($distribution, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = 'fleetMembership1817977703'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $request = (new ImportAttachedClusterRequest()) + ->setParent($formattedParent) + ->setFleetMembership($fleetMembership) + ->setPlatformVersion($platformVersion) + ->setDistribution($distribution); + $response = $gapicClient->importAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listAttachedClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachedClustersElement = new AttachedCluster(); + $attachedClusters = [ + $attachedClustersElement, + ]; + $expectedResponse = new ListAttachedClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachedClusters($attachedClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAttachedClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachedClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachedClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachedClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAttachedClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttachedClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAttachedClusterRequest()) + ->setAttachedCluster($attachedCluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAttachedClusterRequest()) + ->setAttachedCluster($attachedCluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAttachedCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAttachedClusterAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $request = (new CreateAttachedClusterRequest()) + ->setParent($formattedParent) + ->setAttachedCluster($attachedCluster) + ->setAttachedClusterId($attachedClusterId); + $response = $gapicClient->createAttachedClusterAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php new file mode 100644 index 000000000000..6f139fc7e8f7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php @@ -0,0 +1,2046 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AwsClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AwsClustersClient($options); + } + + /** @test */ + public function createAwsClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $awsClusterId = 'awsClusterId938438658'; + $request = (new CreateAwsClusterRequest()) + ->setParent($formattedParent) + ->setAwsCluster($awsCluster) + ->setAwsClusterId($awsClusterId); + $response = $gapicClient->createAwsCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAwsCluster(); + $this->assertProtobufEquals($awsCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAwsClusterId(); + $this->assertProtobufEquals($awsClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $awsClusterId = 'awsClusterId938438658'; + $request = (new CreateAwsClusterRequest()) + ->setParent($formattedParent) + ->setAwsCluster($awsCluster) + ->setAwsClusterId($awsClusterId); + $response = $gapicClient->createAwsCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAwsNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $awsNodePoolId = 'awsNodePoolId1958033635'; + $request = (new CreateAwsNodePoolRequest()) + ->setParent($formattedParent) + ->setAwsNodePool($awsNodePool) + ->setAwsNodePoolId($awsNodePoolId); + $response = $gapicClient->createAwsNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAwsNodePool(); + $this->assertProtobufEquals($awsNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getAwsNodePoolId(); + $this->assertProtobufEquals($awsNodePoolId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $awsNodePoolId = 'awsNodePoolId1958033635'; + $request = (new CreateAwsNodePoolRequest()) + ->setParent($formattedParent) + ->setAwsNodePool($awsNodePool) + ->setAwsNodePoolId($awsNodePoolId); + $response = $gapicClient->createAwsNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new DeleteAwsClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAwsCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new DeleteAwsClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAwsCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAwsNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new DeleteAwsNodePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAwsNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAwsNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new DeleteAwsNodePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAwsNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAwsAccessTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expectedResponse = new GenerateAwsAccessTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GenerateAwsAccessTokenRequest()) + ->setAwsCluster($formattedAwsCluster); + $response = $gapicClient->generateAwsAccessToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsAccessToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsAccessTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GenerateAwsAccessTokenRequest()) + ->setAwsCluster($formattedAwsCluster); + try { + $gapicClient->generateAwsAccessToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAwsClusterAgentTokenRequest()) + ->setAwsCluster($formattedAwsCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + $response = $gapicClient->generateAwsClusterAgentToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAwsClusterAgentTokenRequest()) + ->setAwsCluster($formattedAwsCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + try { + $gapicClient->generateAwsClusterAgentToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getAwsCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getAwsCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AwsJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsJsonWebKeysRequest()) + ->setAwsCluster($formattedAwsCluster); + $response = $gapicClient->getAwsJsonWebKeys($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsJsonWebKeysRequest()) + ->setAwsCluster($formattedAwsCluster); + try { + $gapicClient->getAwsJsonWebKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsNodePoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new GetAwsNodePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->getAwsNodePool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsNodePool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsNodePoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new GetAwsNodePoolRequest()) + ->setName($formattedName); + try { + $gapicClient->getAwsNodePool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AwsOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsOpenIdConfigRequest()) + ->setAwsCluster($formattedAwsCluster); + $response = $gapicClient->getAwsOpenIdConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsOpenIdConfigRequest()) + ->setAwsCluster($formattedAwsCluster); + try { + $gapicClient->getAwsOpenIdConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AwsServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetAwsServerConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getAwsServerConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetAwsServerConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getAwsServerConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $awsClustersElement = new AwsCluster(); + $awsClusters = [ + $awsClustersElement, + ]; + $expectedResponse = new ListAwsClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAwsClusters($awsClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAwsClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAwsClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAwsClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAwsClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAwsClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsNodePoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $awsNodePoolsElement = new AwsNodePool(); + $awsNodePools = [ + $awsNodePoolsElement, + ]; + $expectedResponse = new ListAwsNodePoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAwsNodePools($awsNodePools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new ListAwsNodePoolsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAwsNodePools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAwsNodePools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsNodePools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAwsNodePoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new ListAwsNodePoolsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAwsNodePools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackAwsNodePoolUpdateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new RollbackAwsNodePoolUpdateRequest()) + ->setName($formattedName); + $response = $gapicClient->rollbackAwsNodePoolUpdate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackAwsNodePoolUpdateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new RollbackAwsNodePoolUpdateRequest()) + ->setName($formattedName); + $response = $gapicClient->rollbackAwsNodePoolUpdate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAwsClusterRequest()) + ->setAwsCluster($awsCluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAwsCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAwsCluster(); + $this->assertProtobufEquals($awsCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAwsClusterRequest()) + ->setAwsCluster($awsCluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAwsCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAwsNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $request = (new UpdateAwsNodePoolRequest()) + ->setAwsNodePool($awsNodePool) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAwsNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAwsNodePool(); + $this->assertProtobufEquals($awsNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAwsNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAwsNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $awsNodePool = new AwsNodePool(); + $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; + $awsNodePool->setVersion($awsNodePoolVersion); + $awsNodePoolConfig = new AwsNodeConfig(); + $configIamInstanceProfile = 'configIamInstanceProfile805825313'; + $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); + $configConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); + $awsNodePool->setConfig($awsNodePoolConfig); + $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); + $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; + $awsNodePool->setSubnetId($awsNodePoolSubnetId); + $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $request = (new UpdateAwsNodePoolRequest()) + ->setAwsNodePool($awsNodePool) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAwsNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAwsClusterAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAwsClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $awsRegion = 'awsRegion-1887255946'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AwsCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAwsRegion($awsRegion); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAwsClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $awsCluster = new AwsCluster(); + $awsClusterNetworking = new AwsClusterNetworking(); + $networkingVpcId = 'networkingVpcId-1154507440'; + $awsClusterNetworking->setVpcId($networkingVpcId); + $networkingPodAddressCidrBlocks = []; + $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $awsCluster->setNetworking($awsClusterNetworking); + $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; + $awsCluster->setAwsRegion($awsClusterAwsRegion); + $awsClusterControlPlane = new AwsControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $awsClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSubnetIds = []; + $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); + $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; + $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); + $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); + $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; + $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); + $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); + $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); + $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; + $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); + $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); + $controlPlaneConfigEncryption = new AwsConfigEncryption(); + $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; + $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); + $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); + $awsCluster->setControlPlane($awsClusterControlPlane); + $awsClusterAuthorization = new AwsAuthorization(); + $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); + $awsClusterId = 'awsClusterId938438658'; + $request = (new CreateAwsClusterRequest()) + ->setParent($formattedParent) + ->setAwsCluster($awsCluster) + ->setAwsClusterId($awsClusterId); + $response = $gapicClient->createAwsClusterAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAwsCluster(); + $this->assertProtobufEquals($awsCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAwsClusterId(); + $this->assertProtobufEquals($awsClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php new file mode 100644 index 000000000000..a16b92d02cae --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php @@ -0,0 +1,2270 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AzureClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AzureClustersClient($options); + } + + /** @test */ + public function createAzureClientTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $tenantId = 'tenantId-1852780336'; + $applicationId = 'applicationId-1287148950'; + $reconciling = false; + $pemCertificate = 'pemCertificate1234463984'; + $uid = 'uid115792'; + $expectedResponse = new AzureClient(); + $expectedResponse->setName($name); + $expectedResponse->setTenantId($tenantId); + $expectedResponse->setApplicationId($applicationId); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setPemCertificate($pemCertificate); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureClientTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureClient = new AzureClient(); + $azureClientTenantId = 'azureClientTenantId-567307073'; + $azureClient->setTenantId($azureClientTenantId); + $azureClientApplicationId = 'azureClientApplicationId264838513'; + $azureClient->setApplicationId($azureClientApplicationId); + $azureClientId = 'azureClientId315645023'; + $request = (new CreateAzureClientRequest()) + ->setParent($formattedParent) + ->setAzureClient($azureClient) + ->setAzureClientId($azureClientId); + $response = $gapicClient->createAzureClient($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClient(); + $this->assertProtobufEquals($azureClient, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClientId(); + $this->assertProtobufEquals($azureClientId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClientExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureClient = new AzureClient(); + $azureClientTenantId = 'azureClientTenantId-567307073'; + $azureClient->setTenantId($azureClientTenantId); + $azureClientApplicationId = 'azureClientApplicationId264838513'; + $azureClient->setApplicationId($azureClientApplicationId); + $azureClientId = 'azureClientId315645023'; + $request = (new CreateAzureClientRequest()) + ->setParent($formattedParent) + ->setAzureClient($azureClient) + ->setAzureClientId($azureClientId); + $response = $gapicClient->createAzureClient($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $azureRegion = 'azureRegion-253373788'; + $resourceGroupId = 'resourceGroupId-1092054036'; + $azureClient = 'azureClient-676290693'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AzureCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAzureRegion($azureRegion); + $expectedResponse->setResourceGroupId($resourceGroupId); + $expectedResponse->setAzureClient($azureClient); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $azureClusterId = 'azureClusterId332577072'; + $request = (new CreateAzureClusterRequest()) + ->setParent($formattedParent) + ->setAzureCluster($azureCluster) + ->setAzureClusterId($azureClusterId); + $response = $gapicClient->createAzureCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureCluster(); + $this->assertProtobufEquals($azureCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClusterId(); + $this->assertProtobufEquals($azureClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $azureClusterId = 'azureClusterId332577072'; + $request = (new CreateAzureClusterRequest()) + ->setParent($formattedParent) + ->setAzureCluster($azureCluster) + ->setAzureClusterId($azureClusterId); + $response = $gapicClient->createAzureCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $azureAvailabilityZone = 'azureAvailabilityZone541920864'; + $expectedResponse = new AzureNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $azureNodePoolId = 'azureNodePoolId-454365551'; + $request = (new CreateAzureNodePoolRequest()) + ->setParent($formattedParent) + ->setAzureNodePool($azureNodePool) + ->setAzureNodePoolId($azureNodePoolId); + $response = $gapicClient->createAzureNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureNodePool(); + $this->assertProtobufEquals($azureNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getAzureNodePoolId(); + $this->assertProtobufEquals($azureNodePoolId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $azureNodePoolId = 'azureNodePoolId-454365551'; + $request = (new CreateAzureNodePoolRequest()) + ->setParent($formattedParent) + ->setAzureNodePool($azureNodePool) + ->setAzureNodePoolId($azureNodePoolId); + $response = $gapicClient->createAzureNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClientTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAzureClientTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $request = (new DeleteAzureClientRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAzureClient($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureClient', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClientExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $request = (new DeleteAzureClientRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAzureClient($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAzureClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new DeleteAzureClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAzureCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new DeleteAzureClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAzureCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAzureNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $request = (new DeleteAzureNodePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAzureNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAzureNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $request = (new DeleteAzureNodePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAzureNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAzureAccessTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expectedResponse = new GenerateAzureAccessTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GenerateAzureAccessTokenRequest()) + ->setAzureCluster($formattedAzureCluster); + $response = $gapicClient->generateAzureAccessToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureAccessToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureAccessTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GenerateAzureAccessTokenRequest()) + ->setAzureCluster($formattedAzureCluster); + try { + $gapicClient->generateAzureAccessToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAzureClusterAgentTokenRequest()) + ->setAzureCluster($formattedAzureCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + $response = $gapicClient->generateAzureClusterAgentToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAzureClusterAgentTokenRequest()) + ->setAzureCluster($formattedAzureCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + try { + $gapicClient->generateAzureClusterAgentToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClientTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $tenantId = 'tenantId-1852780336'; + $applicationId = 'applicationId-1287148950'; + $reconciling = false; + $pemCertificate = 'pemCertificate1234463984'; + $uid = 'uid115792'; + $expectedResponse = new AzureClient(); + $expectedResponse->setName($name2); + $expectedResponse->setTenantId($tenantId); + $expectedResponse->setApplicationId($applicationId); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setPemCertificate($pemCertificate); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $request = (new GetAzureClientRequest()) + ->setName($formattedName); + $response = $gapicClient->getAzureClient($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureClient', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClientExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); + $request = (new GetAzureClientRequest()) + ->setName($formattedName); + try { + $gapicClient->getAzureClient($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $azureRegion = 'azureRegion-253373788'; + $resourceGroupId = 'resourceGroupId-1092054036'; + $azureClient = 'azureClient-676290693'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AzureCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAzureRegion($azureRegion); + $expectedResponse->setResourceGroupId($resourceGroupId); + $expectedResponse->setAzureClient($azureClient); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getAzureCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getAzureCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AzureJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureJsonWebKeysRequest()) + ->setAzureCluster($formattedAzureCluster); + $response = $gapicClient->getAzureJsonWebKeys($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureJsonWebKeysRequest()) + ->setAzureCluster($formattedAzureCluster); + try { + $gapicClient->getAzureJsonWebKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureNodePoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $azureAvailabilityZone = 'azureAvailabilityZone541920864'; + $expectedResponse = new AzureNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $request = (new GetAzureNodePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->getAzureNodePool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureNodePool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureNodePoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); + $request = (new GetAzureNodePoolRequest()) + ->setName($formattedName); + try { + $gapicClient->getAzureNodePool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AzureOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureOpenIdConfigRequest()) + ->setAzureCluster($formattedAzureCluster); + $response = $gapicClient->getAzureOpenIdConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureOpenIdConfigRequest()) + ->setAzureCluster($formattedAzureCluster); + try { + $gapicClient->getAzureOpenIdConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AzureServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetAzureServerConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getAzureServerConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); + $request = (new GetAzureServerConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getAzureServerConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClientsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $azureClientsElement = new AzureClient(); + $azureClients = [ + $azureClientsElement, + ]; + $expectedResponse = new ListAzureClientsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAzureClients($azureClients); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAzureClientsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAzureClients($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAzureClients()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClients', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClientsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAzureClientsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAzureClients($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $azureClustersElement = new AzureCluster(); + $azureClusters = [ + $azureClustersElement, + ]; + $expectedResponse = new ListAzureClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAzureClusters($azureClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAzureClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAzureClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAzureClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAzureClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAzureClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureNodePoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $azureNodePoolsElement = new AzureNodePool(); + $azureNodePools = [ + $azureNodePoolsElement, + ]; + $expectedResponse = new ListAzureNodePoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAzureNodePools($azureNodePools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new ListAzureNodePoolsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAzureNodePools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAzureNodePools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureNodePools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAzureNodePoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new ListAzureNodePoolsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAzureNodePools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAzureClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $azureRegion = 'azureRegion-253373788'; + $resourceGroupId = 'resourceGroupId-1092054036'; + $azureClient = 'azureClient-676290693'; + $endpoint = 'endpoint1741102485'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $clusterCaCertificate = 'clusterCaCertificate1324742683'; + $expectedResponse = new AzureCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAzureRegion($azureRegion); + $expectedResponse->setResourceGroupId($resourceGroupId); + $expectedResponse->setAzureClient($azureClient); + $expectedResponse->setEndpoint($endpoint); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setClusterCaCertificate($clusterCaCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAzureClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAzureClusterRequest()) + ->setAzureCluster($azureCluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAzureCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAzureCluster(); + $this->assertProtobufEquals($azureCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAzureClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $azureCluster = new AzureCluster(); + $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; + $azureCluster->setAzureRegion($azureClusterAzureRegion); + $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; + $azureCluster->setResourceGroupId($azureClusterResourceGroupId); + $azureClusterNetworking = new AzureClusterNetworking(); + $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; + $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); + $networkingPodAddressCidrBlocks = []; + $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); + $networkingServiceAddressCidrBlocks = []; + $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); + $azureCluster->setNetworking($azureClusterNetworking); + $azureClusterControlPlane = new AzureControlPlane(); + $controlPlaneVersion = 'controlPlaneVersion648040665'; + $azureClusterControlPlane->setVersion($controlPlaneVersion); + $controlPlaneSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); + $azureCluster->setControlPlane($azureClusterControlPlane); + $azureClusterAuthorization = new AzureAuthorization(); + $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); + $updateMask = new FieldMask(); + $request = (new UpdateAzureClusterRequest()) + ->setAzureCluster($azureCluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAzureCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAzureNodePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $azureAvailabilityZone = 'azureAvailabilityZone541920864'; + $expectedResponse = new AzureNodePool(); + $expectedResponse->setName($name); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAzureNodePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $request = (new UpdateAzureNodePoolRequest()) + ->setAzureNodePool($azureNodePool) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAzureNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureNodePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAzureNodePool(); + $this->assertProtobufEquals($azureNodePool, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAzureNodePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAzureNodePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $azureNodePool = new AzureNodePool(); + $azureNodePoolVersion = 'azureNodePoolVersion349490987'; + $azureNodePool->setVersion($azureNodePoolVersion); + $azureNodePoolConfig = new AzureNodeConfig(); + $configSshConfig = new AzureSshConfig(); + $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; + $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); + $azureNodePoolConfig->setSshConfig($configSshConfig); + $azureNodePool->setConfig($azureNodePoolConfig); + $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; + $azureNodePool->setSubnetId($azureNodePoolSubnetId); + $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); + $autoscalingMinNodeCount = 1464441581; + $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); + $autoscalingMaxNodeCount = 1938867647; + $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); + $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); + $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); + $maxPodsConstraintMaxPodsPerNode = 1072618940; + $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); + $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); + $updateMask = new FieldMask(); + $request = (new UpdateAzureNodePoolRequest()) + ->setAzureNodePool($azureNodePool) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAzureNodePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAzureClientAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAzureClientTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $tenantId = 'tenantId-1852780336'; + $applicationId = 'applicationId-1287148950'; + $reconciling = false; + $pemCertificate = 'pemCertificate1234463984'; + $uid = 'uid115792'; + $expectedResponse = new AzureClient(); + $expectedResponse->setName($name); + $expectedResponse->setTenantId($tenantId); + $expectedResponse->setApplicationId($applicationId); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setPemCertificate($pemCertificate); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAzureClientTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $azureClient = new AzureClient(); + $azureClientTenantId = 'azureClientTenantId-567307073'; + $azureClient->setTenantId($azureClientTenantId); + $azureClientApplicationId = 'azureClientApplicationId264838513'; + $azureClient->setApplicationId($azureClientApplicationId); + $azureClientId = 'azureClientId315645023'; + $request = (new CreateAzureClientRequest()) + ->setParent($formattedParent) + ->setAzureClient($azureClient) + ->setAzureClientId($azureClientId); + $response = $gapicClient->createAzureClientAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClient(); + $this->assertProtobufEquals($azureClient, $actualValue); + $actualValue = $actualApiRequestObject->getAzureClientId(); + $this->assertProtobufEquals($azureClientId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From a2af7e2c1eed794a2d7f9010764233d0210df539 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 15 Dec 2023 20:00:43 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1/AttachedResources.php | Bin 3185 -> 3628 bytes GkeMultiCloud/metadata/V1/AttachedService.php | 38 +- GkeMultiCloud/metadata/V1/AwsResources.php | Bin 7018 -> 8270 bytes GkeMultiCloud/metadata/V1/AwsService.php | 61 +- GkeMultiCloud/metadata/V1/AzureResources.php | Bin 7332 -> 8085 bytes GkeMultiCloud/metadata/V1/AzureService.php | 43 +- GkeMultiCloud/metadata/V1/CommonResources.php | Bin 2180 -> 2515 bytes .../create_attached_cluster.php | 2 +- .../generate_attached_cluster_agent_token.php | 0 .../update_attached_cluster.php | 2 +- .../AwsClustersClient/create_aws_cluster.php | 11 +- .../generate_aws_cluster_agent_token.php | 0 .../get_aws_json_web_keys.php | 0 .../get_aws_open_id_config.php | 0 .../rollback_aws_node_pool_update.php | 0 .../AwsClustersClient/update_aws_cluster.php | 11 +- .../create_azure_cluster.php | 11 +- .../create_azure_node_pool.php | 3 +- .../generate_azure_access_token.php | 2 +- .../generate_azure_cluster_agent_token.php | 0 .../get_azure_json_web_keys.php | 0 .../get_azure_open_id_config.php | 0 .../update_azure_cluster.php | 11 +- GkeMultiCloud/src/V1/AttachedCluster.php | 96 +- .../src}/V1/AttachedClusterGroup.php | 2 +- .../src/V1/AttachedClustersAuthorization.php | 64 +- .../src}/V1/AttachedProxyConfig.php | 2 +- GkeMultiCloud/src/V1/AwsAuthorization.php | 64 +- GkeMultiCloud/src/V1/AwsCluster.php | 44 + .../src}/V1/AwsClusterGroup.php | 2 +- GkeMultiCloud/src/V1/AwsClusterNetworking.php | 50 + .../src}/V1/AwsJsonWebKeys.php | 0 GkeMultiCloud/src/V1/AwsK8sVersionInfo.php | 188 ++ GkeMultiCloud/src/V1/AwsNodeConfig.php | 88 +- .../src}/V1/AwsNodeManagement.php | 2 +- GkeMultiCloud/src/V1/AwsNodePool.php | 88 + .../src}/V1/AwsOpenIdConfig.php | 4 +- GkeMultiCloud/src/V1/AwsServerConfig.php | 20 +- GkeMultiCloud/src/V1/AwsVolumeTemplate.php | 42 + GkeMultiCloud/src/V1/AzureAuthorization.php | 64 +- GkeMultiCloud/src/V1/AzureCluster.php | 8 + .../src}/V1/AzureClusterGroup.php | 2 +- .../src}/V1/AzureJsonWebKeys.php | 0 GkeMultiCloud/src/V1/AzureK8sVersionInfo.php | 198 +- GkeMultiCloud/src/V1/AzureNodeConfig.php | 12 +- .../src}/V1/AzureNodeManagement.php | 2 +- GkeMultiCloud/src/V1/AzureNodePool.php | 44 + .../src}/V1/AzureOpenIdConfig.php | 4 +- GkeMultiCloud/src/V1/AzureServerConfig.php | 20 +- .../src}/V1/BinaryAuthorization.php | 2 +- .../V1/BinaryAuthorization/EvaluationMode.php | 2 - .../src/V1/Client/AttachedClustersClient.php | 30 + .../src/V1/Client/AwsClustersClient.php | 127 + .../src/V1/Client/AzureClustersClient.php | 93 + .../src/V1/CreateAzureNodePoolRequest.php | 15 +- .../src/V1/DeleteAwsClusterRequest.php | 46 + .../src/V1/DeleteAwsNodePoolRequest.php | 46 + .../src/V1/DeleteAzureClusterRequest.php | 2 +- .../src/V1/DeleteAzureNodePoolRequest.php | 2 +- .../V1/Gapic/AttachedClustersGapicClient.php | 117 +- .../src/V1/Gapic/AwsClustersGapicClient.php | 335 +++ .../src/V1/Gapic/AzureClustersGapicClient.php | 221 +- ...nerateAttachedClusterAgentTokenRequest.php | 18 +- ...erateAttachedClusterAgentTokenResponse.php | 6 +- ...eAttachedClusterInstallManifestRequest.php | 44 + .../GenerateAwsClusterAgentTokenRequest.php | 20 +- .../GenerateAwsClusterAgentTokenResponse.php | 6 +- .../V1/GenerateAzureAccessTokenRequest.php | 8 +- .../GenerateAzureClusterAgentTokenRequest.php | 20 +- ...GenerateAzureClusterAgentTokenResponse.php | 6 +- .../src}/V1/GetAwsJsonWebKeysRequest.php | 2 +- .../src}/V1/GetAwsOpenIdConfigRequest.php | 2 +- .../src}/V1/GetAzureJsonWebKeysRequest.php | 2 +- .../src}/V1/GetAzureOpenIdConfigRequest.php | 2 +- .../src/V1/ImportAttachedClusterRequest.php | 44 + .../src}/V1/Jwk.php | 18 +- .../src}/V1/KubernetesSecret.php | 4 +- .../V1/RollbackAwsNodePoolUpdateRequest.php | 4 +- .../src}/V1/SpotConfig.php | 0 .../src}/V1/SurgeSettings.php | 4 +- .../src/V1/UpdateAttachedClusterRequest.php | 40 +- .../src/V1/UpdateAwsClusterRequest.php | 20 + .../src/V1/UpdateAwsNodePoolRequest.php | 40 + .../src/V1/UpdateAzureClusterRequest.php | 5 + .../src/V1/UpdateAzureNodePoolRequest.php | 10 + .../src}/V1/UpdateSettings.php | 2 +- GkeMultiCloud/src/V1/gapic_metadata.json | 40 + .../attached_clusters_client_config.json | 5 + .../attached_clusters_descriptor_config.php | 12 + .../attached_clusters_rest_client_config.php | 12 + .../resources/aws_clusters_client_config.json | 20 + .../aws_clusters_descriptor_config.php | 55 + .../aws_clusters_rest_client_config.php | 46 + .../azure_clusters_client_config.json | 15 + .../azure_clusters_descriptor_config.php | 36 + .../azure_clusters_rest_client_config.php | 34 + .../Unit/V1/AttachedClustersClientTest.php | 77 + .../tests/Unit/V1/AwsClustersClientTest.php | 336 ++- .../tests/Unit/V1/AzureClustersClientTest.php | 207 +- .../V1/Client/AttachedClustersClientTest.php | 88 + .../Unit/V1/Client/AwsClustersClientTest.php | 364 ++- .../V1/Client/AzureClustersClientTest.php | 228 +- .../Gkemulticloud/V1/AttachedResources.php | Bin 3628 -> 0 bytes .../Gkemulticloud/V1/AttachedService.php | 113 - .../Cloud/Gkemulticloud/V1/AwsResources.php | Bin 8270 -> 0 bytes .../Cloud/Gkemulticloud/V1/AwsService.php | 156 -- .../Cloud/Gkemulticloud/V1/AzureResources.php | Bin 8085 -> 0 bytes .../Cloud/Gkemulticloud/V1/AzureService.php | 173 -- .../Gkemulticloud/V1/CommonResources.php | Bin 2515 -> 0 bytes .../GkeMultiCloud/V1/AttachedCluster.php | 965 ------- .../V1/AttachedCluster/State.php | 96 - .../GkeMultiCloud/V1/AttachedClusterError.php | 67 - .../GkeMultiCloud/V1/AttachedClusterUser.php | 67 - .../V1/AttachedClustersAuthorization.php | 133 - .../GkeMultiCloud/V1/AttachedOidcConfig.php | 129 - .../V1/AttachedPlatformVersionInfo.php | 67 - .../GkeMultiCloud/V1/AttachedServerConfig.php | 102 - .../GkeMultiCloud/V1/AwsAuthorization.php | 133 - .../AwsAutoscalingGroupMetricsCollection.php | 118 - .../Cloud/GkeMultiCloud/V1/AwsCluster.php | 923 ------- .../GkeMultiCloud/V1/AwsCluster/State.php | 96 - .../GkeMultiCloud/V1/AwsClusterError.php | 67 - .../GkeMultiCloud/V1/AwsClusterNetworking.php | 211 -- .../Cloud/GkeMultiCloud/V1/AwsClusterUser.php | 67 - .../GkeMultiCloud/V1/AwsConfigEncryption.php | 67 - .../GkeMultiCloud/V1/AwsControlPlane.php | 693 ----- .../V1/AwsDatabaseEncryption.php | 67 - .../GkeMultiCloud/V1/AwsInstancePlacement.php | 70 - .../V1/AwsInstancePlacement/Tenancy.php | 75 - .../GkeMultiCloud/V1/AwsK8sVersionInfo.php | 255 -- .../Cloud/GkeMultiCloud/V1/AwsNodeConfig.php | 663 ----- .../Cloud/GkeMultiCloud/V1/AwsNodePool.php | 727 ------ .../GkeMultiCloud/V1/AwsNodePool/State.php | 95 - .../V1/AwsNodePoolAutoscaling.php | 110 - .../GkeMultiCloud/V1/AwsNodePoolError.php | 67 - .../Cloud/GkeMultiCloud/V1/AwsProxyConfig.php | 121 - .../GkeMultiCloud/V1/AwsServerConfig.php | 147 -- .../V1/AwsServicesAuthentication.php | 109 - .../Cloud/GkeMultiCloud/V1/AwsSshConfig.php | 67 - .../GkeMultiCloud/V1/AwsVolumeTemplate.php | 239 -- .../V1/AwsVolumeTemplate/VolumeType.php | 67 - .../GkeMultiCloud/V1/AzureAuthorization.php | 133 - .../Cloud/GkeMultiCloud/V1/AzureClient.php | 411 --- .../Cloud/GkeMultiCloud/V1/AzureCluster.php | 1087 -------- .../GkeMultiCloud/V1/AzureCluster/State.php | 96 - .../GkeMultiCloud/V1/AzureClusterError.php | 67 - .../V1/AzureClusterNetworking.php | 241 -- .../V1/AzureClusterResources.php | 102 - .../GkeMultiCloud/V1/AzureClusterUser.php | 67 - .../V1/AzureConfigEncryption.php | 131 - .../GkeMultiCloud/V1/AzureControlPlane.php | 613 ----- .../V1/AzureDatabaseEncryption.php | 85 - .../GkeMultiCloud/V1/AzureDiskTemplate.php | 75 - .../GkeMultiCloud/V1/AzureK8sVersionInfo.php | 255 -- .../GkeMultiCloud/V1/AzureNodeConfig.php | 432 ---- .../Cloud/GkeMultiCloud/V1/AzureNodePool.php | 713 ------ .../GkeMultiCloud/V1/AzureNodePool/State.php | 95 - .../V1/AzureNodePoolAutoscaling.php | 111 - .../GkeMultiCloud/V1/AzureNodePoolError.php | 67 - .../GkeMultiCloud/V1/AzureProxyConfig.php | 129 - .../GkeMultiCloud/V1/AzureServerConfig.php | 164 -- .../V1/AzureServicesAuthentication.php | 101 - .../Cloud/GkeMultiCloud/V1/AzureSshConfig.php | 75 - .../V1/CreateAttachedClusterRequest.php | 261 -- .../V1/CreateAwsClusterRequest.php | 261 -- .../V1/CreateAwsNodePoolRequest.php | 265 -- .../V1/CreateAzureClientRequest.php | 261 -- .../V1/CreateAzureClusterRequest.php | 261 -- .../V1/CreateAzureNodePoolRequest.php | 265 -- .../V1/DeleteAttachedClusterRequest.php | 292 --- .../V1/DeleteAwsClusterRequest.php | 288 --- .../V1/DeleteAwsNodePoolRequest.php | 292 --- .../V1/DeleteAzureClientRequest.php | 197 -- .../V1/DeleteAzureClusterRequest.php | 242 -- .../V1/DeleteAzureNodePoolRequest.php | 250 -- .../Google/Cloud/GkeMultiCloud/V1/Fleet.php | 131 - ...eAttachedClusterInstallManifestRequest.php | 289 --- ...AttachedClusterInstallManifestResponse.php | 72 - .../V1/GenerateAwsAccessTokenRequest.php | 91 - .../V1/GenerateAwsAccessTokenResponse.php | 111 - .../V1/GenerateAzureAccessTokenRequest.php | 91 - .../V1/GenerateAzureAccessTokenResponse.php | 111 - .../V1/GetAttachedClusterRequest.php | 113 - .../V1/GetAttachedServerConfigRequest.php | 114 - .../GkeMultiCloud/V1/GetAwsClusterRequest.php | 113 - .../V1/GetAwsNodePoolRequest.php | 113 - .../V1/GetAwsServerConfigRequest.php | 113 - .../V1/GetAzureClientRequest.php | 118 - .../V1/GetAzureClusterRequest.php | 113 - .../V1/GetAzureNodePoolRequest.php | 113 - .../V1/GetAzureServerConfigRequest.php | 113 - .../V1/ImportAttachedClusterRequest.php | 306 --- .../V1/ListAttachedClustersRequest.php | 199 -- .../V1/ListAttachedClustersResponse.php | 109 - .../V1/ListAwsClustersRequest.php | 199 -- .../V1/ListAwsClustersResponse.php | 109 - .../V1/ListAwsNodePoolsRequest.php | 204 -- .../V1/ListAwsNodePoolsResponse.php | 109 - .../V1/ListAzureClientsRequest.php | 199 -- .../V1/ListAzureClientsResponse.php | 109 - .../V1/ListAzureClustersRequest.php | 199 -- .../V1/ListAzureClustersResponse.php | 109 - .../V1/ListAzureNodePoolsRequest.php | 204 -- .../V1/ListAzureNodePoolsResponse.php | 109 - .../V1/LoggingComponentConfig.php | 67 - .../V1/LoggingComponentConfig/Component.php | 64 - .../Cloud/GkeMultiCloud/V1/LoggingConfig.php | 77 - .../V1/ManagedPrometheusConfig.php | 68 - .../GkeMultiCloud/V1/MaxPodsConstraint.php | 67 - .../GkeMultiCloud/V1/MonitoringConfig.php | 77 - .../Cloud/GkeMultiCloud/V1/NodeTaint.php | 135 - .../GkeMultiCloud/V1/NodeTaint/Effect.php | 77 - .../GkeMultiCloud/V1/OperationMetadata.php | 315 --- .../GkeMultiCloud/V1/ReplicaPlacement.php | 113 - .../V1/UpdateAttachedClusterRequest.php | 246 -- .../V1/UpdateAwsClusterRequest.php | 321 --- .../V1/UpdateAwsNodePoolRequest.php | 336 --- .../V1/UpdateAzureClusterRequest.php | 271 -- .../V1/UpdateAzureNodePoolRequest.php | 221 -- .../V1/WorkloadIdentityConfig.php | 139 - .../create_attached_cluster.php | 145 -- .../delete_attached_cluster.php | 96 - ...rate_attached_cluster_install_manifest.php | 109 - .../get_attached_cluster.php | 84 - .../get_attached_server_config.php | 80 - .../import_attached_cluster.php | 118 - .../list_attached_clusters.php | 83 - .../update_attached_cluster.php | 117 - .../AwsClustersClient/create_aws_cluster.php | 220 -- .../create_aws_node_pool.php | 168 -- .../AwsClustersClient/delete_aws_cluster.php | 95 - .../delete_aws_node_pool.php | 97 - .../generate_aws_access_token.php | 84 - .../V1/AwsClustersClient/get_aws_cluster.php | 80 - .../AwsClustersClient/get_aws_node_pool.php | 85 - .../get_aws_server_config.php | 80 - .../AwsClustersClient/list_aws_clusters.php | 83 - .../AwsClustersClient/list_aws_node_pools.php | 85 - .../AwsClustersClient/update_aws_cluster.php | 192 -- .../update_aws_node_pool.php | 140 - .../create_azure_client.php | 127 - .../create_azure_cluster.php | 213 -- .../create_azure_node_pool.php | 166 -- .../delete_azure_client.php | 96 - .../delete_azure_cluster.php | 99 - .../delete_azure_node_pool.php | 97 - .../generate_azure_access_token.php | 84 - .../AzureClustersClient/get_azure_client.php | 81 - .../AzureClustersClient/get_azure_cluster.php | 84 - .../get_azure_node_pool.php | 85 - .../get_azure_server_config.php | 80 - .../list_azure_clients.php | 83 - .../list_azure_clusters.php | 83 - .../list_azure_node_pools.php | 89 - .../update_azure_cluster.php | 185 -- .../update_azure_node_pool.php | 133 - .../v1/src/V1/AttachedClustersClient.php | 34 - .../v1/src/V1/AwsClustersClient.php | 34 - .../v1/src/V1/AzureClustersClient.php | 34 - .../src/V1/Client/AttachedClustersClient.php | 572 ----- .../v1/src/V1/Client/AwsClustersClient.php | 802 ------ .../v1/src/V1/Client/AzureClustersClient.php | 922 ------- .../V1/Gapic/AttachedClustersGapicClient.php | 1123 -------- .../src/V1/Gapic/AwsClustersGapicClient.php | 1666 ------------ .../src/V1/Gapic/AzureClustersGapicClient.php | 1890 -------------- .../v1/src/V1/gapic_metadata.json | 256 -- .../attached_clusters_client_config.json | 89 - .../attached_clusters_descriptor_config.php | 158 -- .../attached_clusters_rest_client_config.php | 165 -- .../resources/aws_clusters_client_config.json | 124 - .../aws_clusters_descriptor_config.php | 273 -- .../aws_clusters_rest_client_config.php | 251 -- .../azure_clusters_client_config.json | 139 - .../azure_clusters_descriptor_config.php | 325 --- .../azure_clusters_rest_client_config.php | 287 --- .../Unit/V1/AttachedClustersClientTest.php | 1007 -------- .../tests/Unit/V1/AwsClustersClientTest.php | 1824 ------------- .../tests/Unit/V1/AzureClustersClientTest.php | 2065 --------------- .../V1/Client/AttachedClustersClientTest.php | 1174 --------- .../Unit/V1/Client/AwsClustersClientTest.php | 2046 --------------- .../V1/Client/AzureClustersClientTest.php | 2270 ----------------- 281 files changed, 3985 insertions(+), 46200 deletions(-) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AwsClustersClient/get_aws_json_web_keys.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AwsClustersClient/get_aws_open_id_config.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AzureClustersClient/get_azure_json_web_keys.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1 => GkeMultiCloud}/samples/V1/AzureClustersClient/get_azure_open_id_config.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AttachedClusterGroup.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AttachedProxyConfig.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AwsClusterGroup.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AwsJsonWebKeys.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AwsNodeManagement.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AwsOpenIdConfig.php (99%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AzureClusterGroup.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AzureJsonWebKeys.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AzureNodeManagement.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/AzureOpenIdConfig.php (99%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/BinaryAuthorization.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/BinaryAuthorization/EvaluationMode.php (90%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GenerateAttachedClusterAgentTokenRequest.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GenerateAttachedClusterAgentTokenResponse.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GenerateAwsClusterAgentTokenRequest.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GenerateAwsClusterAgentTokenResponse.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GenerateAzureClusterAgentTokenRequest.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GenerateAzureClusterAgentTokenResponse.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GetAwsJsonWebKeysRequest.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GetAwsOpenIdConfigRequest.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GetAzureJsonWebKeysRequest.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/GetAzureOpenIdConfigRequest.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/Jwk.php (96%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/KubernetesSecret.php (97%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/RollbackAwsNodePoolUpdateRequest.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/SpotConfig.php (100%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/SurgeSettings.php (98%) rename {owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud => GkeMultiCloud/src}/V1/UpdateSettings.php (98%) delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/AwsClustersClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/AzureClustersClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php delete mode 100644 owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php diff --git a/GkeMultiCloud/metadata/V1/AttachedResources.php b/GkeMultiCloud/metadata/V1/AttachedResources.php index 3692d8b622c890e985c2fa2afb160ecd2941ce39..93800c00950918742b46d2b89b7b5ae293b3232f 100644 GIT binary patch delta 354 zcmew;u|{UYS0z(xAFvxTGVNuYEX0{3%qZl?#gmwlo0%7%UX)*2P%ObT`45{3mph09 zwq|lYr@n#~mk7)m&N-#UC8i^#TO25(+kvOE!})1Cj#F3bVrlA_TLG2rK~sZIihPYykq3b_y@E M(F%tFv+xW&0SN38NB{r; diff --git a/GkeMultiCloud/metadata/V1/AttachedService.php b/GkeMultiCloud/metadata/V1/AttachedService.php index 78a2e7bbf8d2..201ec24b7e06 100644 --- a/GkeMultiCloud/metadata/V1/AttachedService.php +++ b/GkeMultiCloud/metadata/V1/AttachedService.php @@ -19,29 +19,33 @@ public static function initOnce() { \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -é -4google/cloud/gkemulticloud/v1/attached_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/gkemulticloud/v1/attached_resources.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"¶ +º( +4google/cloud/gkemulticloud/v1/attached_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/gkemulticloud/v1/attached_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"… -GenerateAttachedClusterInstallManifestRequestD parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster attached_cluster_id ( BàA -platform_version ( BàA"B +platform_version ( BàAM + proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"B .GenerateAttachedClusterInstallManifestResponse manifest ( "ì CreateAttachedClusterRequestD parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedClusterM attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA attached_cluster_id ( BàA - validate_only ("Ô + validate_only ("£ ImportAttachedClusterRequestD parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster validate_only ( fleet_membership ( BàA platform_version ( BàA - distribution ( BàA"º + distribution ( BàAM + proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"º UpdateAttachedClusterRequestM attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA validate_only (4 @@ -66,7 +70,26 @@ public static function initOnce() { etag ( "i GetAttachedServerConfigRequestG name ( B9àAúA3 -1gkemulticloud.googleapis.com/AttachedServerConfig2µ +1gkemulticloud.googleapis.com/AttachedServerConfig"Ê +(GenerateAttachedClusterAgentTokenRequestN +attached_cluster ( B4àAúA. +,gkemulticloud.googleapis.com/AttachedCluster + subject_token ( BàA +subject_token_type ( BàA +version ( BàA + +grant_type ( BàA +audience ( BàA +scope ( BàA! +requested_token_type ( BàA +options + ( BàA"i +)GenerateAttachedClusterAgentTokenResponse + access_token (  + +expires_in ( + +token_type ( 2Ý AttachedClusters™ CreateAttachedCluster;.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.google.longrunning.Operation"£‚Óä“H"4/v1/{parent=projects/*/locations/*}/attachedClusters:attached_clusterÚA+parent,attached_cluster,attached_cluster_idÊA$ AttachedClusterOperationMetadata› @@ -79,7 +102,8 @@ public static function initOnce() { DeleteAttachedCluster;.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.google.longrunning.Operation"p‚Óä“6*4/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÊA* google.protobuf.EmptyOperationMetadataÔ GetAttachedServerConfig=.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest3.google.cloud.gkemulticloud.v1.AttachedServerConfig"E‚Óä“86/v1/{name=projects/*/locations/*/attachedServerConfig}ÚAname¶ -&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"o‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifestÚAparent,attached_cluster_idPÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBç +&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"o‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifestÚAparent,attached_cluster_id¥ +!GenerateAttachedClusterAgentTokenG.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequestH.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenResponse"m‚Óä“g"b/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken:*PÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBç !com.google.cloud.gkemulticloud.v1BAttachedServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' , true); diff --git a/GkeMultiCloud/metadata/V1/AwsResources.php b/GkeMultiCloud/metadata/V1/AwsResources.php index 37d44a144b15230f9d77fcd92405239af61055a4..4163515796ab81495e740bfb47708ca138d7decf 100644 GIT binary patch delta 1087 zcmZWoO-vI(7|m|~=oH#AK)Zl}T4@3TrE)Owq=3W#Q4dHoXfjUQVOhGJ+3f66(L+6W z@nT{o9z9CJO;ciw@#xu;Cr&2bNW2>p6KALV6g*Ax-uL_7H-}fh-FW{+7bU$ves9Mi zk8Wa*h+TbA|9MUP(!UN5WlY9Qo6LBUovBK;=(x;d`L~JIerPg01lK@+*`nCpLD=^; znQJ}8p2et<5zauNZ(dPzolNT>mXGMWn)utjKB&PZ(2c8giz3ryzQYYY7aC8@7KIj_ z0Jj2YKJ;Tw6AyYOhYKJz*We4b&pqNQ4nh!7d7{yCU4NmAPd#r^Spd9EnQ3l1zGpQHQvQvMNCiV>aR@a($a{RJAxR+oWnla@u&8YMOr)Z(T}#*3)uG zP{$OTq)w=3jEG0Q1yM@J#%`a0Dgmy5lSg6$H-1e?z?730Zlwk6`HF7c%0v!ZV~jHL16~O>-Y&$`GzLfh_t7=08#<&Q@o8W zJJ?dHe9Y#jL9bNxj#T7y8)$%pw38v1IM{LxEpaN!pVn~SdMFDQK!Q8WLls6hEYnEK zh{WuK^lcQZN_;`V!pVGWe%F+7cO62Ps%;!5LDb^hC$hFojKehO+G^A|@?A>}7l%1u zxI}iKoS@+PxLnL}nCnT8Lh?xBa1>;@U)~}W@4tYs3YZ23tBRT)s}YL0Wm4$~!nTRF zvF)EJ7*X*CNLOrZ)jL~771IY2ri~DQv6C=i06ZV4`q3weUooE}#PG}Xe4P;vz#0Z}32_7gTa%y-S^)x+ zMh+{Jm<}@n>j9I^4waL84_5(ulhhA;10wbZvw#q~0+WFVtdo8ekpZ={;}u#1lY$ws XlTI7=0VI=093->*9H{}b&mMmPCzC8x diff --git a/GkeMultiCloud/metadata/V1/AwsService.php b/GkeMultiCloud/metadata/V1/AwsService.php index 0c6fd9724988..1b138f920d2d 100644 --- a/GkeMultiCloud/metadata/V1/AwsService.php +++ b/GkeMultiCloud/metadata/V1/AwsService.php @@ -19,13 +19,15 @@ public static function initOnce() { \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' -Ö* -/google/cloud/gkemulticloud/v1/aws_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/gkemulticloud/v1/aws_resources.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ó +Ž9 +/google/cloud/gkemulticloud/v1/aws_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/gkemulticloud/v1/aws_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ó CreateAwsClusterRequest? parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsClusterC aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA @@ -45,12 +47,13 @@ public static function initOnce() { page_token ( "s ListAwsClustersResponse? aws_clusters ( 2).google.cloud.gkemulticloud.v1.AwsCluster -next_page_token ( "” +next_page_token ( "° DeleteAwsClusterRequest= name ( B/àAúA) \'gkemulticloud.googleapis.com/AwsCluster validate_only ( - allow_missing ( + allow_missing ( + ignore_errors (BàA etag ( "Ú CreateAwsNodePoolRequest@ parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePoolF @@ -60,7 +63,11 @@ public static function initOnce() { UpdateAwsNodePoolRequestF aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"W + update_mask ( 2.google.protobuf.FieldMaskBàA"| + RollbackAwsNodePoolUpdateRequest> +name ( B0àAúA* +(gkemulticloud.googleapis.com/AwsNodePool + respect_pdb (BàA"W GetAwsNodePoolRequest> name ( B0àAúA* (gkemulticloud.googleapis.com/AwsNodePool"‚ @@ -71,13 +78,20 @@ public static function initOnce() { page_token ( "w ListAwsNodePoolsResponseB aws_node_pools ( 2*.google.cloud.gkemulticloud.v1.AwsNodePool -next_page_token ( "– +next_page_token ( "² DeleteAwsNodePoolRequest> name ( B0àAúA* (gkemulticloud.googleapis.com/AwsNodePool validate_only ( - allow_missing ( -etag ( "_ + allow_missing ( + ignore_errors (BàA +etag ( "a +GetAwsOpenIdConfigRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster"` +GetAwsJsonWebKeysRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster"_ GetAwsServerConfigRequestB name ( B4àAúA. ,gkemulticloud.googleapis.com/AwsServerConfig"e @@ -86,7 +100,27 @@ public static function initOnce() { \'gkemulticloud.googleapis.com/AwsCluster"u GenerateAwsAccessTokenResponse access_token ( BàA8 -expiration_time ( 2.google.protobuf.TimestampBàA2þ +expiration_time ( 2.google.protobuf.TimestampBàA"Ö +#GenerateAwsClusterAgentTokenRequestD + aws_cluster ( B/àAúA) +\'gkemulticloud.googleapis.com/AwsCluster + subject_token ( BàA +subject_token_type ( BàA +version ( BàA + node_pool_id ( BàA + +grant_type ( BàA +audience ( BàA +scope ( BàA! +requested_token_type ( BàA +options + ( BàA"d +$GenerateAwsClusterAgentTokenResponse + access_token (  + +expires_in ( + +token_type ( 2© AwsClustersö CreateAwsCluster6.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.google.longrunning.Operation"Š‚Óä“>"//v1/{parent=projects/*/locations/*}/awsClusters: aws_clusterÚA!parent,aws_cluster,aws_cluster_idÊA @@ -97,16 +131,21 @@ public static function initOnce() { GetAwsCluster3.google.cloud.gkemulticloud.v1.GetAwsClusterRequest).google.cloud.gkemulticloud.v1.AwsCluster">‚Óä“1//v1/{name=projects/*/locations/*/awsClusters/*}ÚAname ListAwsClusters5.google.cloud.gkemulticloud.v1.ListAwsClustersRequest6.google.cloud.gkemulticloud.v1.ListAwsClustersResponse"@‚Óä“1//v1/{parent=projects/*/locations/*}/awsClustersÚAparentÖ DeleteAwsCluster6.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.google.longrunning.Operation"k‚Óä“1*//v1/{name=projects/*/locations/*/awsClusters/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataì +google.protobuf.EmptyOperationMetadata‡ +GenerateAwsClusterAgentTokenB.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequestC.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenResponse"^‚Óä“X"S/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken:*ì GenerateAwsAccessToken<.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest=.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse"U‚Óä“OM/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessTokenŽ CreateAwsNodePool7.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.google.longrunning.Operation" ‚Óä“O">/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools: aws_node_poolÚA%parent,aws_node_pool,aws_node_pool_idÊA AwsNodePoolOperationMetadata UpdateAwsNodePool7.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.google.longrunning.Operation"¢‚Óä“]2L/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}: aws_node_poolÚAaws_node_pool,update_maskÊA + AwsNodePoolOperationMetadataù +RollbackAwsNodePoolUpdate?.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest.google.longrunning.Operation"|‚Óä“L"G/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback:*ÚAnameÊA AwsNodePoolOperationMetadataÁ GetAwsNodePool4.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest*.google.cloud.gkemulticloud.v1.AwsNodePool"M‚Óä“@>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ÚAnameÔ ListAwsNodePools6.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest7.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"O‚Óä“@>/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePoolsÚAparentç DeleteAwsNodePool7.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.google.longrunning.Operation"z‚Óä“@*>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataÀ +google.protobuf.EmptyOperationMetadataß +GetAwsOpenIdConfig8.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest..google.cloud.gkemulticloud.v1.AwsOpenIdConfig"_‚Óä“YW/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configurationÀ +GetAwsJsonWebKeys7.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest-.google.cloud.gkemulticloud.v1.AwsJsonWebKeys"C‚Óä“=;/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwksÀ GetAwsServerConfig8.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest..google.cloud.gkemulticloud.v1.AwsServerConfig"@‚Óä“31/v1/{name=projects/*/locations/*/awsServerConfig}ÚAnamePÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBâ !com.google.cloud.gkemulticloud.v1BAwsServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' , true); diff --git a/GkeMultiCloud/metadata/V1/AzureResources.php b/GkeMultiCloud/metadata/V1/AzureResources.php index 6f0c8cdc700a7aaaf94943eabbf02cdcb30aba38..5666e4e33faa7ac2f5a4f2c3cb5f5dd5fe15e9c7 100644 GIT binary patch delta 691 zcmZXSPiqrF7>C)}{GBvqGi}o~Pz}LqKutnVdXk!g*kHW~UW&uC`)1i@GqddMTI#{% z8+aHzc@;$PUb3B)EQ1n13B*J@hraz>-p@0mk> zpt`;sj~Qn^jDaWaRSi^jc9c`SzIq@$c>Fg~-%ID}!^YcQ7q6KLmt*4M3QH3~V~AJ~ zn@T0q*Q{SJ+mo->qOm6t@JC)>@L}MSRa^+9OkvKKiGxcgrz1(zIMA=uy^6U8s3!Y(Fq(U{{cAz+`-$y#G{EA0jDzXdBA`TF)!O;NDB%69x^cQ$!)w6LkLXUGjw5zu7&UqK1&)s^anTJ&yfHC delta 80 zcmV-W0I&a*KcqRZzyg!=0xtyWG72-1OEZ&M1Cg@=1b7VrUz2internalAddGeneratedFile( ' -Ç8 -1google/cloud/gkemulticloud/v1/azure_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/gkemulticloud/v1/azure_resources.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ý +¡D +1google/cloud/gkemulticloud/v1/azure_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/gkemulticloud/v1/azure_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ý CreateAzureClusterRequestA parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureClusterG azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA @@ -77,7 +79,13 @@ public static function initOnce() { *gkemulticloud.googleapis.com/AzureNodePool validate_only ( allow_missing ( -etag ( "c +etag ( "g +GetAzureOpenIdConfigRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster"f +GetAzureJsonWebKeysRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster"c GetAzureServerConfigRequestD name ( B6àAúA0 .gkemulticloud.googleapis.com/AzureServerConfig"Ø @@ -107,7 +115,27 @@ public static function initOnce() { )gkemulticloud.googleapis.com/AzureCluster"w GenerateAzureAccessTokenResponse access_token ( BàA8 -expiration_time ( 2.google.protobuf.TimestampBàA2Ý +expiration_time ( 2.google.protobuf.TimestampBàA"Ü +%GenerateAzureClusterAgentTokenRequestH + azure_cluster ( B1àAúA+ +)gkemulticloud.googleapis.com/AzureCluster + subject_token ( BàA +subject_token_type ( BàA +version ( BàA + node_pool_id ( BàA + +grant_type ( BàA +audience ( BàA +scope ( BàA! +requested_token_type ( BàA +options + ( BàA"f +&GenerateAzureClusterAgentTokenResponse + access_token (  + +expires_in ( + +token_type ( 2Ì# AzureClustersý CreateAzureClient7.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.google.longrunning.Operation"‚Óä“@"0/v1/{parent=projects/*/locations/*}/azureClients: azure_clientÚA#parent,azure_client,azure_client_idÊA AzureClientOperationMetadata³ @@ -122,7 +150,8 @@ public static function initOnce() { GetAzureCluster5.google.cloud.gkemulticloud.v1.GetAzureClusterRequest+.google.cloud.gkemulticloud.v1.AzureCluster"@‚Óä“31/v1/{name=projects/*/locations/*/azureClusters/*}ÚAnameÊ ListAzureClusters7.google.cloud.gkemulticloud.v1.ListAzureClustersRequest8.google.cloud.gkemulticloud.v1.ListAzureClustersResponse"B‚Óä“31/v1/{parent=projects/*/locations/*}/azureClustersÚAparentÜ DeleteAzureCluster8.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/azureClusters/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataø +google.protobuf.EmptyOperationMetadata“ +GenerateAzureClusterAgentTokenD.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequestE.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenResponse"d‚Óä“^"Y/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken:*ø GenerateAzureAccessToken>.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest?.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse"[‚Óä“US/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessTokenž CreateAzureNodePool9.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.google.longrunning.Operation"¬‚Óä“U"B/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools:azure_node_poolÚA)parent,azure_node_pool,azure_node_pool_idÊA" AzureNodePoolOperationMetadata  @@ -131,7 +160,9 @@ public static function initOnce() { GetAzureNodePool6.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest,.google.cloud.gkemulticloud.v1.AzureNodePool"Q‚Óä“DB/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ÚAnameÞ ListAzureNodePools8.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest9.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse"S‚Óä“DB/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePoolsÚAparentï DeleteAzureNodePool9.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.google.longrunning.Operation"~‚Óä“D*B/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataÈ +google.protobuf.EmptyOperationMetadataù +GetAzureOpenIdConfig:.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest0.google.cloud.gkemulticloud.v1.AzureOpenIdConfig"s‚Óä“][/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configurationÚA azure_clusterÚ +GetAzureJsonWebKeys9.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest/.google.cloud.gkemulticloud.v1.AzureJsonWebKeys"W‚Óä“A?/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwksÚA azure_clusterÈ GetAzureServerConfig:.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest0.google.cloud.gkemulticloud.v1.AzureServerConfig"B‚Óä“53/v1/{name=projects/*/locations/*/azureServerConfig}ÚAnamePÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBä !com.google.cloud.gkemulticloud.v1BAzureServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' , true); diff --git a/GkeMultiCloud/metadata/V1/CommonResources.php b/GkeMultiCloud/metadata/V1/CommonResources.php index c07c39fa719b1844f934041348b4dbb3903658a5..9162c8f2951509859a2ceaf20a01cc1b8662003b 100644 GIT binary patch delta 347 zcmZn>yezySn~7;2-{f4T^7LMSwww zhl|6-GuY9|2gqX-QsGhv2=e!Gbq_vBor^34& diff --git a/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php index 9602d94ed329..ceeb76a431d8 100644 --- a/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php @@ -57,7 +57,7 @@ * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. * @param string $attachedClusterDistribution The Kubernetes distribution of the underlying attached cluster. * - * Supported values: ["eks", "aks"]. + * Supported values: ["eks", "aks", "generic"]. * @param string $attachedClusterFleetProject The name of the Fleet host project where this cluster will be * registered. * diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php rename to GkeMultiCloud/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php diff --git a/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php index 648a7a15e607..f306c2314e1b 100644 --- a/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php @@ -44,7 +44,7 @@ * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. * @param string $attachedClusterDistribution The Kubernetes distribution of the underlying attached cluster. * - * Supported values: ["eks", "aks"]. + * Supported values: ["eks", "aks", "generic"]. * @param string $attachedClusterFleetProject The name of the Fleet host project where this cluster will be * registered. * diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php b/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php index 65eaf649bcb2..36a48da38394 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php @@ -28,7 +28,6 @@ use Google\Cloud\GkeMultiCloud\V1\AwsAuthorization; use Google\Cloud\GkeMultiCloud\V1\AwsCluster; use Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking; -use Google\Cloud\GkeMultiCloud\V1\AwsClusterUser; use Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption; use Google\Cloud\GkeMultiCloud\V1\AwsControlPlane; use Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption; @@ -87,7 +86,6 @@ * @param string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos * Multi-Cloud API will assume when managing AWS resources on your account. * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param string $awsClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. * @param string $awsClusterFleetProject The name of the Fleet host project where this cluster will be * registered. * @@ -115,7 +113,6 @@ function create_aws_cluster_sample( string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterAuthorizationAdminUsersUsername, string $awsClusterFleetProject, string $awsClusterId ): void { @@ -145,11 +142,7 @@ function create_aws_cluster_sample( ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); - $awsClusterUser = (new AwsClusterUser()) - ->setUsername($awsClusterAuthorizationAdminUsersUsername); - $awsClusterAuthorizationAdminUsers = [$awsClusterUser,]; - $awsClusterAuthorization = (new AwsAuthorization()) - ->setAdminUsers($awsClusterAuthorizationAdminUsers); + $awsClusterAuthorization = new AwsAuthorization(); $awsClusterFleet = (new Fleet()) ->setProject($awsClusterFleetProject); $awsCluster = (new AwsCluster()) @@ -205,7 +198,6 @@ function callSample(): void $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterAuthorizationAdminUsersUsername = '[USERNAME]'; $awsClusterFleetProject = '[PROJECT]'; $awsClusterId = '[AWS_CLUSTER_ID]'; @@ -221,7 +213,6 @@ function callSample(): void $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterAuthorizationAdminUsersUsername, $awsClusterFleetProject, $awsClusterId ); diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php b/GkeMultiCloud/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php rename to GkeMultiCloud/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_json_web_keys.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php rename to GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_json_web_keys.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_open_id_config.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php rename to GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_open_id_config.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php b/GkeMultiCloud/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php rename to GkeMultiCloud/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php b/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php index 7ea2382f78d5..b6cd8507aaa9 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php @@ -28,7 +28,6 @@ use Google\Cloud\GkeMultiCloud\V1\AwsAuthorization; use Google\Cloud\GkeMultiCloud\V1\AwsCluster; use Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking; -use Google\Cloud\GkeMultiCloud\V1\AwsClusterUser; use Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption; use Google\Cloud\GkeMultiCloud\V1\AwsControlPlane; use Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption; @@ -74,7 +73,6 @@ * @param string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos * Multi-Cloud API will assume when managing AWS resources on your account. * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param string $awsClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. * @param string $awsClusterFleetProject The name of the Fleet host project where this cluster will be * registered. * @@ -92,7 +90,6 @@ function update_aws_cluster_sample( string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterAuthorizationAdminUsersUsername, string $awsClusterFleetProject ): void { // Create a client. @@ -121,11 +118,7 @@ function update_aws_cluster_sample( ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); - $awsClusterUser = (new AwsClusterUser()) - ->setUsername($awsClusterAuthorizationAdminUsersUsername); - $awsClusterAuthorizationAdminUsers = [$awsClusterUser,]; - $awsClusterAuthorization = (new AwsAuthorization()) - ->setAdminUsers($awsClusterAuthorizationAdminUsers); + $awsClusterAuthorization = new AwsAuthorization(); $awsClusterFleet = (new Fleet()) ->setProject($awsClusterFleetProject); $awsCluster = (new AwsCluster()) @@ -180,7 +173,6 @@ function callSample(): void $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterAuthorizationAdminUsersUsername = '[USERNAME]'; $awsClusterFleetProject = '[PROJECT]'; update_aws_cluster_sample( @@ -194,7 +186,6 @@ function callSample(): void $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterAuthorizationAdminUsersUsername, $awsClusterFleetProject ); } diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php index 19ae828f69b4..d5a0e0d2ecce 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php @@ -28,7 +28,6 @@ use Google\Cloud\GkeMultiCloud\V1\AzureAuthorization; use Google\Cloud\GkeMultiCloud\V1\AzureCluster; use Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking; -use Google\Cloud\GkeMultiCloud\V1\AzureClusterUser; use Google\Cloud\GkeMultiCloud\V1\AzureControlPlane; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; use Google\Cloud\GkeMultiCloud\V1\Client\AzureClustersClient; @@ -95,7 +94,6 @@ * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts * the authorized_keys file format used in OpenSSH according to the sshd(8) * manual page. - * @param string $azureClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be * registered. * @@ -120,7 +118,6 @@ function create_azure_cluster_sample( string $azureClusterNetworkingServiceAddressCidrBlocksElement, string $azureClusterControlPlaneVersion, string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterAuthorizationAdminUsersUsername, string $azureClusterFleetProject, string $azureClusterId ): void { @@ -143,11 +140,7 @@ function create_azure_cluster_sample( $azureClusterControlPlane = (new AzureControlPlane()) ->setVersion($azureClusterControlPlaneVersion) ->setSshConfig($azureClusterControlPlaneSshConfig); - $azureClusterUser = (new AzureClusterUser()) - ->setUsername($azureClusterAuthorizationAdminUsersUsername); - $azureClusterAuthorizationAdminUsers = [$azureClusterUser,]; - $azureClusterAuthorization = (new AzureAuthorization()) - ->setAdminUsers($azureClusterAuthorizationAdminUsers); + $azureClusterAuthorization = new AzureAuthorization(); $azureClusterFleet = (new Fleet()) ->setProject($azureClusterFleetProject); $azureCluster = (new AzureCluster()) @@ -201,7 +194,6 @@ function callSample(): void $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; $azureClusterControlPlaneVersion = '[VERSION]'; $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureClusterAuthorizationAdminUsersUsername = '[USERNAME]'; $azureClusterFleetProject = '[PROJECT]'; $azureClusterId = '[AZURE_CLUSTER_ID]'; @@ -214,7 +206,6 @@ function callSample(): void $azureClusterNetworkingServiceAddressCidrBlocksElement, $azureClusterControlPlaneVersion, $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterAuthorizationAdminUsersUsername, $azureClusterFleetProject, $azureClusterId ); diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php index 89dffd634280..1dde814eca26 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php @@ -46,7 +46,8 @@ * @param string $formattedParent The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. * - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. Please see diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php b/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php index e3c8034d3094..bb4c463a581e 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php @@ -37,7 +37,7 @@ * authenticate to. * * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. + * `projects//locations//azureClusters/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. Please see diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php b/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php rename to GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_json_web_keys.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php rename to GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_json_web_keys.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_open_id_config.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php rename to GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_open_id_config.php diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php b/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php index ca95447257cb..bec457bdda0b 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php @@ -28,7 +28,6 @@ use Google\Cloud\GkeMultiCloud\V1\AzureAuthorization; use Google\Cloud\GkeMultiCloud\V1\AzureCluster; use Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking; -use Google\Cloud\GkeMultiCloud\V1\AzureClusterUser; use Google\Cloud\GkeMultiCloud\V1\AzureControlPlane; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; use Google\Cloud\GkeMultiCloud\V1\Client\AzureClustersClient; @@ -82,7 +81,6 @@ * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts * the authorized_keys file format used in OpenSSH according to the sshd(8) * manual page. - * @param string $azureClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be * registered. * @@ -97,7 +95,6 @@ function update_azure_cluster_sample( string $azureClusterNetworkingServiceAddressCidrBlocksElement, string $azureClusterControlPlaneVersion, string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterAuthorizationAdminUsersUsername, string $azureClusterFleetProject ): void { // Create a client. @@ -119,11 +116,7 @@ function update_azure_cluster_sample( $azureClusterControlPlane = (new AzureControlPlane()) ->setVersion($azureClusterControlPlaneVersion) ->setSshConfig($azureClusterControlPlaneSshConfig); - $azureClusterUser = (new AzureClusterUser()) - ->setUsername($azureClusterAuthorizationAdminUsersUsername); - $azureClusterAuthorizationAdminUsers = [$azureClusterUser,]; - $azureClusterAuthorization = (new AzureAuthorization()) - ->setAdminUsers($azureClusterAuthorizationAdminUsers); + $azureClusterAuthorization = new AzureAuthorization(); $azureClusterFleet = (new Fleet()) ->setProject($azureClusterFleetProject); $azureCluster = (new AzureCluster()) @@ -176,7 +169,6 @@ function callSample(): void $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; $azureClusterControlPlaneVersion = '[VERSION]'; $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureClusterAuthorizationAdminUsersUsername = '[USERNAME]'; $azureClusterFleetProject = '[PROJECT]'; update_azure_cluster_sample( @@ -187,7 +179,6 @@ function callSample(): void $azureClusterNetworkingServiceAddressCidrBlocksElement, $azureClusterControlPlaneVersion, $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterAuthorizationAdminUsersUsername, $azureClusterFleetProject ); } diff --git a/GkeMultiCloud/src/V1/AttachedCluster.php b/GkeMultiCloud/src/V1/AttachedCluster.php index 170418d21a7e..f0294ce32abb 100644 --- a/GkeMultiCloud/src/V1/AttachedCluster.php +++ b/GkeMultiCloud/src/V1/AttachedCluster.php @@ -49,7 +49,7 @@ class AttachedCluster extends \Google\Protobuf\Internal\Message private $platform_version = ''; /** * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. + * Supported values: ["eks", "aks", "generic"]. * * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; */ @@ -156,6 +156,18 @@ class AttachedCluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; */ private $monitoring_config = null; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $proxy_config = null; + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $binary_authorization = null; /** * Constructor. @@ -181,7 +193,7 @@ class AttachedCluster extends \Google\Protobuf\Internal\Message * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. * @type string $distribution * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. + * Supported values: ["eks", "aks", "generic"]. * @type string $cluster_region * Output only. The region where this cluster runs. * For EKS clusters, this is a AWS region. For AKS clusters, @@ -224,6 +236,10 @@ class AttachedCluster extends \Google\Protobuf\Internal\Message * Optional. Configuration related to the cluster RBAC settings. * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config * Optional. Monitoring configuration for this cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization + * Optional. Binary Authorization configuration for this cluster. * } */ public function __construct($data = NULL) { @@ -363,7 +379,7 @@ public function setPlatformVersion($var) /** * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. + * Supported values: ["eks", "aks", "generic"]. * * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -375,7 +391,7 @@ public function getDistribution() /** * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. + * Supported values: ["eks", "aks", "generic"]. * * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -873,5 +889,77 @@ public function setMonitoringConfig($var) return $this; } + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php b/GkeMultiCloud/src/V1/AttachedClusterGroup.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php rename to GkeMultiCloud/src/V1/AttachedClusterGroup.php index 74ec3910d5e6..f2e682de10a1 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php +++ b/GkeMultiCloud/src/V1/AttachedClusterGroup.php @@ -20,7 +20,7 @@ class AttachedClusterGroup extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; */ - protected $group = ''; + private $group = ''; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php b/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php index 87939094f336..ee4306f352a8 100644 --- a/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php +++ b/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php @@ -16,15 +16,25 @@ class AttachedClustersAuthorization extends \Google\Protobuf\Internal\Message { /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $admin_users; + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_groups; /** * Constructor. @@ -33,11 +43,17 @@ class AttachedClustersAuthorization extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * } */ public function __construct($data = NULL) { @@ -46,13 +62,13 @@ public function __construct($data = NULL) { } /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAdminUsers() @@ -61,13 +77,13 @@ public function getAdminUsers() } /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -79,5 +95,39 @@ public function setAdminUsers($var) return $this; } + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminGroups() + { + return $this->admin_groups; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup::class); + $this->admin_groups = $arr; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php b/GkeMultiCloud/src/V1/AttachedProxyConfig.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php rename to GkeMultiCloud/src/V1/AttachedProxyConfig.php index e08ea3aba3b0..ef408fbd5989 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php +++ b/GkeMultiCloud/src/V1/AttachedProxyConfig.php @@ -22,7 +22,7 @@ class AttachedProxyConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; */ - protected $kubernetes_secret = null; + private $kubernetes_secret = null; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/AwsAuthorization.php b/GkeMultiCloud/src/V1/AwsAuthorization.php index 02a19ba26a49..25f25a6866ee 100644 --- a/GkeMultiCloud/src/V1/AwsAuthorization.php +++ b/GkeMultiCloud/src/V1/AwsAuthorization.php @@ -16,15 +16,25 @@ class AwsAuthorization extends \Google\Protobuf\Internal\Message { /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $admin_users; + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_groups; /** * Constructor. @@ -33,11 +43,17 @@ class AwsAuthorization extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * } */ public function __construct($data = NULL) { @@ -46,13 +62,13 @@ public function __construct($data = NULL) { } /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAdminUsers() @@ -61,13 +77,13 @@ public function getAdminUsers() } /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -79,5 +95,39 @@ public function setAdminUsers($var) return $this; } + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminGroups() + { + return $this->admin_groups; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup::class); + $this->admin_groups = $arr; + + return $this; + } + } diff --git a/GkeMultiCloud/src/V1/AwsCluster.php b/GkeMultiCloud/src/V1/AwsCluster.php index ba90e4ca3634..b10b048bb3c5 100644 --- a/GkeMultiCloud/src/V1/AwsCluster.php +++ b/GkeMultiCloud/src/V1/AwsCluster.php @@ -154,6 +154,12 @@ class AwsCluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; */ private $monitoring_config = null; + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $binary_authorization = null; /** * Constructor. @@ -220,6 +226,8 @@ class AwsCluster extends \Google\Protobuf\Internal\Message * Output only. A set of errors found in the cluster. * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config * Optional. Monitoring configuration for this cluster. + * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization + * Optional. Binary Authorization configuration for this cluster. * } */ public function __construct($data = NULL) { @@ -875,5 +883,41 @@ public function setMonitoringConfig($var) return $this; } + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Optional. Binary Authorization configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php b/GkeMultiCloud/src/V1/AwsClusterGroup.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php rename to GkeMultiCloud/src/V1/AwsClusterGroup.php index 6c954b94c1b2..ee2d9b711e8a 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php +++ b/GkeMultiCloud/src/V1/AwsClusterGroup.php @@ -20,7 +20,7 @@ class AwsClusterGroup extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; */ - protected $group = ''; + private $group = ''; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/AwsClusterNetworking.php b/GkeMultiCloud/src/V1/AwsClusterNetworking.php index 21775bac7845..3c045e3cd7d2 100644 --- a/GkeMultiCloud/src/V1/AwsClusterNetworking.php +++ b/GkeMultiCloud/src/V1/AwsClusterNetworking.php @@ -41,6 +41,16 @@ class AwsClusterNetworking extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; */ private $service_address_cidr_blocks; + /** + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * + * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $per_node_pool_sg_rules_disabled = false; /** * Constructor. @@ -60,6 +70,12 @@ class AwsClusterNetworking extends \Google\Protobuf\Internal\Message * Required. All services in the cluster are assigned an IPv4 address from * these ranges. Only a single range is supported. This field cannot be * changed after creation. + * @type bool $per_node_pool_sg_rules_disabled + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. * } */ public function __construct($data = NULL) { @@ -157,5 +173,39 @@ public function setServiceAddressCidrBlocks($var) return $this; } + /** + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * + * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getPerNodePoolSgRulesDisabled() + { + return $this->per_node_pool_sg_rules_disabled; + } + + /** + * Optional. Disable the per node pool subnet security group rules on the + * control plane security group. When set to true, you must also provide one + * or more security groups that ensure node pools are able to send requests to + * the control plane on TCP/443 and TCP/8132. Failure to do so may result in + * unavailable node pools. + * + * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setPerNodePoolSgRulesDisabled($var) + { + GPBUtil::checkBool($var); + $this->per_node_pool_sg_rules_disabled = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php b/GkeMultiCloud/src/V1/AwsJsonWebKeys.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php rename to GkeMultiCloud/src/V1/AwsJsonWebKeys.php diff --git a/GkeMultiCloud/src/V1/AwsK8sVersionInfo.php b/GkeMultiCloud/src/V1/AwsK8sVersionInfo.php index d5aa7a2a1e41..981eb3e2dde0 100644 --- a/GkeMultiCloud/src/V1/AwsK8sVersionInfo.php +++ b/GkeMultiCloud/src/V1/AwsK8sVersionInfo.php @@ -21,6 +21,38 @@ class AwsK8sVersionInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string version = 1; */ private $version = ''; + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $enabled = false; + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $end_of_life = false; + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $end_of_life_date = null; + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $release_date = null; /** * Constructor. @@ -30,6 +62,22 @@ class AwsK8sVersionInfo extends \Google\Protobuf\Internal\Message * * @type string $version * Kubernetes version name. + * @type bool $enabled + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * @type bool $end_of_life + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * @type \Google\Type\Date $end_of_life_date + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * @type \Google\Type\Date $release_date + * Optional. The date (in Pacific Time) when the cluster version was released. * } */ public function __construct($data = NULL) { @@ -63,5 +111,145 @@ public function setVersion($var) return $this; } + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEndOfLife() + { + return $this->end_of_life; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEndOfLife($var) + { + GPBUtil::checkBool($var); + $this->end_of_life = $var; + + return $this; + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getEndOfLifeDate() + { + return $this->end_of_life_date; + } + + public function hasEndOfLifeDate() + { + return isset($this->end_of_life_date); + } + + public function clearEndOfLifeDate() + { + unset($this->end_of_life_date); + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndOfLifeDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_of_life_date = $var; + + return $this; + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getReleaseDate() + { + return $this->release_date; + } + + public function hasReleaseDate() + { + return isset($this->release_date); + } + + public function clearReleaseDate() + { + unset($this->release_date); + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setReleaseDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->release_date = $var; + + return $this; + } + } diff --git a/GkeMultiCloud/src/V1/AwsNodeConfig.php b/GkeMultiCloud/src/V1/AwsNodeConfig.php index 8c474cb3b400..2f63e3222de7 100644 --- a/GkeMultiCloud/src/V1/AwsNodeConfig.php +++ b/GkeMultiCloud/src/V1/AwsNodeConfig.php @@ -16,8 +16,9 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message { /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the node pool's version. + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. * * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -63,8 +64,7 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message private $iam_instance_profile = ''; /** * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -111,6 +111,15 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; */ private $autoscaling_metrics_collection = null; + /** + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $spot_config = null; /** * Constructor. @@ -119,8 +128,9 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $instance_type - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the node pool's version. + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume * Optional. Template for the root volume provisioned for node pool nodes. * Volumes will be provisioned in the availability zone assigned @@ -142,8 +152,7 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * pool. * @type string $image_type * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config * Optional. The SSH configuration. @@ -162,6 +171,11 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * Optional. Configuration related to CloudWatch metrics collection on the * Auto Scaling group of the node pool. * When unspecified, metrics collection is disabled. + * @type \Google\Cloud\GkeMultiCloud\V1\SpotConfig $spot_config + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. * } */ public function __construct($data = NULL) { @@ -170,8 +184,9 @@ public function __construct($data = NULL) { } /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the node pool's version. + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. * * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -182,8 +197,9 @@ public function getInstanceType() } /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the node pool's version. + * Optional. The EC2 instance type when creating on-Demand instances. + * If unspecified during node pool creation, a default will be chosen based on + * the node pool version, and assigned to this field. * * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -357,8 +373,7 @@ public function setIamInstanceProfile($var) /** * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -371,8 +386,7 @@ public function getImageType() /** * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -603,5 +617,47 @@ public function setAutoscalingMetricsCollection($var) return $this; } + /** + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\SpotConfig|null + */ + public function getSpotConfig() + { + return $this->spot_config; + } + + public function hasSpotConfig() + { + return isset($this->spot_config); + } + + public function clearSpotConfig() + { + unset($this->spot_config); + } + + /** + * Optional. Configuration for provisioning EC2 Spot instances + * When specified, the node pool will provision Spot instances from the set + * of spot_config.instance_types. + * This field is mutually exclusive with `instance_type`. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\SpotConfig $var + * @return $this + */ + public function setSpotConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SpotConfig::class); + $this->spot_config = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php b/GkeMultiCloud/src/V1/AwsNodeManagement.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php rename to GkeMultiCloud/src/V1/AwsNodeManagement.php index 881f7bcf2ef8..5e992e472f36 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php +++ b/GkeMultiCloud/src/V1/AwsNodeManagement.php @@ -24,7 +24,7 @@ class AwsNodeManagement extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $auto_repair = false; + private $auto_repair = false; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/AwsNodePool.php b/GkeMultiCloud/src/V1/AwsNodePool.php index f4c87301b3f9..42bd9d380334 100644 --- a/GkeMultiCloud/src/V1/AwsNodePool.php +++ b/GkeMultiCloud/src/V1/AwsNodePool.php @@ -119,6 +119,18 @@ class AwsNodePool extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $errors; + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $management = null; + /** + * Optional. Update settings control the speed and disruption of the update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $update_settings = null; /** * Constructor. @@ -174,6 +186,10 @@ class AwsNodePool extends \Google\Protobuf\Internal\Message * simultaneously on a node in the node pool. * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors * Output only. A set of errors found in the node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $management + * Optional. The Management configuration for this node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $update_settings + * Optional. Update settings control the speed and disruption of the update. * } */ public function __construct($data = NULL) { @@ -635,5 +651,77 @@ public function setErrors($var) return $this; } + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement|null + */ + public function getManagement() + { + return $this->management; + } + + public function hasManagement() + { + return isset($this->management); + } + + public function clearManagement() + { + unset($this->management); + } + + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement::class); + $this->management = $var; + + return $this; + } + + /** + * Optional. Update settings control the speed and disruption of the update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\UpdateSettings|null + */ + public function getUpdateSettings() + { + return $this->update_settings; + } + + public function hasUpdateSettings() + { + return isset($this->update_settings); + } + + public function clearUpdateSettings() + { + unset($this->update_settings); + } + + /** + * Optional. Update settings control the speed and disruption of the update. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $var + * @return $this + */ + public function setUpdateSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\UpdateSettings::class); + $this->update_settings = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php b/GkeMultiCloud/src/V1/AwsOpenIdConfig.php similarity index 99% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php rename to GkeMultiCloud/src/V1/AwsOpenIdConfig.php index 01857611cf0f..2e8fbbf6701b 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php +++ b/GkeMultiCloud/src/V1/AwsOpenIdConfig.php @@ -21,13 +21,13 @@ class AwsOpenIdConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string issuer = 1; */ - protected $issuer = ''; + private $issuer = ''; /** * JSON Web Key uri. * * Generated from protobuf field string jwks_uri = 2; */ - protected $jwks_uri = ''; + private $jwks_uri = ''; /** * Supported response types. * diff --git a/GkeMultiCloud/src/V1/AwsServerConfig.php b/GkeMultiCloud/src/V1/AwsServerConfig.php index fe86c0d18b9c..5ddbe9ab94f7 100644 --- a/GkeMultiCloud/src/V1/AwsServerConfig.php +++ b/GkeMultiCloud/src/V1/AwsServerConfig.php @@ -22,7 +22,10 @@ class AwsServerConfig extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; */ @@ -43,7 +46,10 @@ class AwsServerConfig extends \Google\Protobuf\Internal\Message * @type string $name * The resource name of the config. * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * @type array|\Google\Protobuf\Internal\RepeatedField $supported_aws_regions * The list of supported AWS regions. * } @@ -80,7 +86,10 @@ public function setName($var) } /** - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; * @return \Google\Protobuf\Internal\RepeatedField @@ -91,7 +100,10 @@ public function getValidVersions() } /** - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/GkeMultiCloud/src/V1/AwsVolumeTemplate.php b/GkeMultiCloud/src/V1/AwsVolumeTemplate.php index 357227a37aec..05d320c7ce03 100644 --- a/GkeMultiCloud/src/V1/AwsVolumeTemplate.php +++ b/GkeMultiCloud/src/V1/AwsVolumeTemplate.php @@ -37,6 +37,14 @@ class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $iops = 0; + /** + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * + * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $throughput = 0; /** * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) * used to encrypt AWS EBS volumes. @@ -63,6 +71,10 @@ class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message * @type int $iops * Optional. The number of I/O operations per second (IOPS) to provision for * GP3 volume. + * @type int $throughput + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. * @type string $kms_key_arn * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) * used to encrypt AWS EBS volumes. @@ -161,6 +173,36 @@ public function setIops($var) return $this; } + /** + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * + * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getThroughput() + { + return $this->throughput; + } + + /** + * Optional. The throughput that the volume supports, in MiB/s. Only valid if + * volume_type is GP3. + * If the volume_type is GP3 and this is not speficied, it defaults to 125. + * + * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setThroughput($var) + { + GPBUtil::checkInt32($var); + $this->throughput = $var; + + return $this; + } + /** * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) * used to encrypt AWS EBS volumes. diff --git a/GkeMultiCloud/src/V1/AzureAuthorization.php b/GkeMultiCloud/src/V1/AzureAuthorization.php index 6d63c2f8cedc..25a4862f0652 100644 --- a/GkeMultiCloud/src/V1/AzureAuthorization.php +++ b/GkeMultiCloud/src/V1/AzureAuthorization.php @@ -16,15 +16,25 @@ class AzureAuthorization extends \Google\Protobuf\Internal\Message { /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $admin_users; + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admin_groups; /** * Constructor. @@ -33,11 +43,17 @@ class AzureAuthorization extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * } */ public function __construct($data = NULL) { @@ -46,13 +62,13 @@ public function __construct($data = NULL) { } /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAdminUsers() @@ -61,13 +77,13 @@ public function getAdminUsers() } /** - * Required. Users that can perform operations as a cluster admin. A managed + * Optional. Users that can perform operations as a cluster admin. A managed * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole * to the users. Up to ten admin users can be provided. * For more info on RBAC, see * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -79,5 +95,39 @@ public function setAdminUsers($var) return $this; } + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminGroups() + { + return $this->admin_groups; + } + + /** + * Optional. Groups of users that can perform operations as a cluster admin. A + * managed ClusterRoleBinding will be created to grant the `cluster-admin` + * ClusterRole to the groups. Up to ten admin groups can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdminGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup::class); + $this->admin_groups = $arr; + + return $this; + } + } diff --git a/GkeMultiCloud/src/V1/AzureCluster.php b/GkeMultiCloud/src/V1/AzureCluster.php index a22a6de5871e..e47b476dd19e 100644 --- a/GkeMultiCloud/src/V1/AzureCluster.php +++ b/GkeMultiCloud/src/V1/AzureCluster.php @@ -55,6 +55,7 @@ class AzureCluster extends \Google\Protobuf\Internal\Message * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains * authentication configuration for how the Anthos Multi-Cloud API connects to * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. * The `AzureClient` resource must reside on the same Google Cloud Platform * project and region as the `AzureCluster`. * `AzureClient` names are formatted as @@ -85,6 +86,7 @@ class AzureCluster extends \Google\Protobuf\Internal\Message private $authorization = null; /** * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -220,6 +222,7 @@ class AzureCluster extends \Google\Protobuf\Internal\Message * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains * authentication configuration for how the Anthos Multi-Cloud API connects to * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. * The `AzureClient` resource must reside on the same Google Cloud Platform * project and region as the `AzureCluster`. * `AzureClient` names are formatted as @@ -234,6 +237,7 @@ class AzureCluster extends \Google\Protobuf\Internal\Message * Required. Configuration related to the cluster RBAC settings. * @type \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $azure_services_authentication * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. * @type int $state * Output only. The current state of the cluster. * @type string $endpoint @@ -412,6 +416,7 @@ public function setResourceGroupId($var) * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains * authentication configuration for how the Anthos Multi-Cloud API connects to * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. * The `AzureClient` resource must reside on the same Google Cloud Platform * project and region as the `AzureCluster`. * `AzureClient` names are formatted as @@ -432,6 +437,7 @@ public function getAzureClient() * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains * authentication configuration for how the Anthos Multi-Cloud API connects to * Azure APIs. + * Either azure_client or azure_services_authentication should be provided. * The `AzureClient` resource must reside on the same Google Cloud Platform * project and region as the `AzureCluster`. * `AzureClient` names are formatted as @@ -561,6 +567,7 @@ public function setAuthorization($var) /** * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication|null @@ -582,6 +589,7 @@ public function clearAzureServicesAuthentication() /** * Optional. Authentication configuration for management of Azure resources. + * Either azure_client or azure_services_authentication should be provided. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $var diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php b/GkeMultiCloud/src/V1/AzureClusterGroup.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php rename to GkeMultiCloud/src/V1/AzureClusterGroup.php index dee74b296f31..7540571ac9b4 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php +++ b/GkeMultiCloud/src/V1/AzureClusterGroup.php @@ -20,7 +20,7 @@ class AzureClusterGroup extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; */ - protected $group = ''; + private $group = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php b/GkeMultiCloud/src/V1/AzureJsonWebKeys.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php rename to GkeMultiCloud/src/V1/AzureJsonWebKeys.php diff --git a/GkeMultiCloud/src/V1/AzureK8sVersionInfo.php b/GkeMultiCloud/src/V1/AzureK8sVersionInfo.php index 85aef083f401..121e118c6af5 100644 --- a/GkeMultiCloud/src/V1/AzureK8sVersionInfo.php +++ b/GkeMultiCloud/src/V1/AzureK8sVersionInfo.php @@ -9,18 +9,50 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Information about a supported Kubernetes version. + * Kubernetes version information of GKE cluster on Azure. * * Generated from protobuf message google.cloud.gkemulticloud.v1.AzureK8sVersionInfo */ class AzureK8sVersionInfo extends \Google\Protobuf\Internal\Message { /** - * A supported Kubernetes version (for example, `1.19.10-gke.1000`) + * Kubernetes version name (for example, `1.19.10-gke.1000`) * * Generated from protobuf field string version = 1; */ private $version = ''; + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $enabled = false; + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $end_of_life = false; + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $end_of_life_date = null; + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $release_date = null; /** * Constructor. @@ -29,7 +61,23 @@ class AzureK8sVersionInfo extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $version - * A supported Kubernetes version (for example, `1.19.10-gke.1000`) + * Kubernetes version name (for example, `1.19.10-gke.1000`) + * @type bool $enabled + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * @type bool $end_of_life + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * @type \Google\Type\Date $end_of_life_date + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * @type \Google\Type\Date $release_date + * Optional. The date (in Pacific Time) when the cluster version was released. * } */ public function __construct($data = NULL) { @@ -38,7 +86,7 @@ public function __construct($data = NULL) { } /** - * A supported Kubernetes version (for example, `1.19.10-gke.1000`) + * Kubernetes version name (for example, `1.19.10-gke.1000`) * * Generated from protobuf field string version = 1; * @return string @@ -49,7 +97,7 @@ public function getVersion() } /** - * A supported Kubernetes version (for example, `1.19.10-gke.1000`) + * Kubernetes version name (for example, `1.19.10-gke.1000`) * * Generated from protobuf field string version = 1; * @param string $var @@ -63,5 +111,145 @@ public function setVersion($var) return $this; } + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. True if the version is available for cluster creation. If a + * version is enabled for creation, it can be used to create new clusters. + * Otherwise, cluster creation will fail. However, cluster upgrade operations + * may succeed, even if the version is not enabled. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEndOfLife() + { + return $this->end_of_life; + } + + /** + * Optional. True if this cluster version belongs to a minor version that has + * reached its end of life and is no longer in scope to receive security and + * bug fixes. + * + * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEndOfLife($var) + { + GPBUtil::checkBool($var); + $this->end_of_life = $var; + + return $this; + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getEndOfLifeDate() + { + return $this->end_of_life_date; + } + + public function hasEndOfLifeDate() + { + return isset($this->end_of_life_date); + } + + public function clearEndOfLifeDate() + { + unset($this->end_of_life_date); + } + + /** + * Optional. The estimated date (in Pacific Time) when this cluster version + * will reach its end of life. Or if this version is no longer supported (the + * `end_of_life` field is true), this is the actual date (in Pacific time) + * when the version reached its end of life. + * + * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndOfLifeDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_of_life_date = $var; + + return $this; + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getReleaseDate() + { + return $this->release_date; + } + + public function hasReleaseDate() + { + return isset($this->release_date); + } + + public function clearReleaseDate() + { + unset($this->release_date); + } + + /** + * Optional. The date (in Pacific Time) when the cluster version was released. + * + * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setReleaseDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->release_date = $var; + + return $this; + } + } diff --git a/GkeMultiCloud/src/V1/AzureNodeConfig.php b/GkeMultiCloud/src/V1/AzureNodeConfig.php index 59f617643528..c5d819166217 100644 --- a/GkeMultiCloud/src/V1/AzureNodeConfig.php +++ b/GkeMultiCloud/src/V1/AzureNodeConfig.php @@ -45,8 +45,7 @@ class AzureNodeConfig extends \Google\Protobuf\Internal\Message private $tags; /** * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -108,8 +107,7 @@ class AzureNodeConfig extends \Google\Protobuf\Internal\Message * 255 Unicode characters. * @type string $image_type * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config * Required. SSH configuration for how to access the node pool machines. @@ -238,8 +236,7 @@ public function setTags($var) /** * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -252,8 +249,7 @@ public function getImageType() /** * Optional. The OS image type to use on node pool instances. - * Can have a value of `ubuntu`, or `windows` if the cluster enables - * the Windows node pool preview feature. + * Can be unspecified, or have a value of `ubuntu`. * When unspecified, it defaults to `ubuntu`. * * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php b/GkeMultiCloud/src/V1/AzureNodeManagement.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php rename to GkeMultiCloud/src/V1/AzureNodeManagement.php index fafb582d67b4..212df6fc3a09 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php +++ b/GkeMultiCloud/src/V1/AzureNodeManagement.php @@ -24,7 +24,7 @@ class AzureNodeManagement extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $auto_repair = false; + private $auto_repair = false; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/AzureNodePool.php b/GkeMultiCloud/src/V1/AzureNodePool.php index 22c4c34f4c11..6cc7edbd6f8a 100644 --- a/GkeMultiCloud/src/V1/AzureNodePool.php +++ b/GkeMultiCloud/src/V1/AzureNodePool.php @@ -124,6 +124,12 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $errors; + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $management = null; /** * Constructor. @@ -180,6 +186,8 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message * When unspecified, it defaults to `1`. * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors * Output only. A set of errors found in the node pool. + * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $management + * Optional. The Management configuration for this node pool. * } */ public function __construct($data = NULL) { @@ -665,5 +673,41 @@ public function setErrors($var) return $this; } + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement|null + */ + public function getManagement() + { + return $this->management; + } + + public function hasManagement() + { + return isset($this->management); + } + + public function clearManagement() + { + unset($this->management); + } + + /** + * Optional. The Management configuration for this node pool. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement::class); + $this->management = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php b/GkeMultiCloud/src/V1/AzureOpenIdConfig.php similarity index 99% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php rename to GkeMultiCloud/src/V1/AzureOpenIdConfig.php index cad099ee30e3..a3116e88a272 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php +++ b/GkeMultiCloud/src/V1/AzureOpenIdConfig.php @@ -21,13 +21,13 @@ class AzureOpenIdConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string issuer = 1; */ - protected $issuer = ''; + private $issuer = ''; /** * JSON Web Key uri. * * Generated from protobuf field string jwks_uri = 2; */ - protected $jwks_uri = ''; + private $jwks_uri = ''; /** * Supported response types. * diff --git a/GkeMultiCloud/src/V1/AzureServerConfig.php b/GkeMultiCloud/src/V1/AzureServerConfig.php index 211c39ddc17f..c9568f614b21 100644 --- a/GkeMultiCloud/src/V1/AzureServerConfig.php +++ b/GkeMultiCloud/src/V1/AzureServerConfig.php @@ -27,7 +27,10 @@ class AzureServerConfig extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; */ @@ -52,7 +55,10 @@ class AzureServerConfig extends \Google\Protobuf\Internal\Message * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud Platform resource names. * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * @type array|\Google\Protobuf\Internal\RepeatedField $supported_azure_regions * The list of supported Azure regions. * } @@ -97,7 +103,10 @@ public function setName($var) } /** - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; * @return \Google\Protobuf\Internal\RepeatedField @@ -108,7 +117,10 @@ public function getValidVersions() } /** - * List of valid Kubernetes versions. + * List of all released Kubernetes versions, including ones which are end of + * life and can no longer be used. Filter by the `enabled` + * property to limit to currently available versions. + * Valid versions supported for both create and update operations * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php b/GkeMultiCloud/src/V1/BinaryAuthorization.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php rename to GkeMultiCloud/src/V1/BinaryAuthorization.php index 9272bbf1053d..fd6263b43a79 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php +++ b/GkeMultiCloud/src/V1/BinaryAuthorization.php @@ -21,7 +21,7 @@ class BinaryAuthorization extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; */ - protected $evaluation_mode = 0; + private $evaluation_mode = 0; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php b/GkeMultiCloud/src/V1/BinaryAuthorization/EvaluationMode.php similarity index 90% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php rename to GkeMultiCloud/src/V1/BinaryAuthorization/EvaluationMode.php index 72c8aa9234c5..e3a02d40b927 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php +++ b/GkeMultiCloud/src/V1/BinaryAuthorization/EvaluationMode.php @@ -60,6 +60,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EvaluationMode::class, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization_EvaluationMode::class); diff --git a/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php b/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php index 70638ad923b2..52169eee523f 100644 --- a/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php @@ -39,6 +39,8 @@ use Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig; use Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest; use Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse; use Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest; @@ -64,6 +66,7 @@ * * @method PromiseInterface createAttachedClusterAsync(CreateAttachedClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteAttachedClusterAsync(DeleteAttachedClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAttachedClusterAgentTokenAsync(GenerateAttachedClusterAgentTokenRequest $request, array $optionalArgs = []) * @method PromiseInterface generateAttachedClusterInstallManifestAsync(GenerateAttachedClusterInstallManifestRequest $request, array $optionalArgs = []) * @method PromiseInterface getAttachedClusterAsync(GetAttachedClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface getAttachedServerConfigAsync(GetAttachedServerConfigRequest $request, array $optionalArgs = []) @@ -366,6 +369,33 @@ public function deleteAttachedCluster(DeleteAttachedClusterRequest $request, arr return $this->startApiCall('DeleteAttachedCluster', $request, $callOptions)->wait(); } + /** + * Generates an access token for a cluster agent. + * + * The async variant is + * {@see AttachedClustersClient::generateAttachedClusterAgentTokenAsync()} . + * + * @example samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php + * + * @param GenerateAttachedClusterAgentTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAttachedClusterAgentTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAttachedClusterAgentToken(GenerateAttachedClusterAgentTokenRequest $request, array $callOptions = []): GenerateAttachedClusterAgentTokenResponse + { + return $this->startApiCall('GenerateAttachedClusterAgentToken', $request, $callOptions)->wait(); + } + /** * Generates the install manifest to be installed on the target cluster. * diff --git a/GkeMultiCloud/src/V1/Client/AwsClustersClient.php b/GkeMultiCloud/src/V1/Client/AwsClustersClient.php index 91aaecece59b..0f7b6e65be6e 100644 --- a/GkeMultiCloud/src/V1/Client/AwsClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AwsClustersClient.php @@ -36,7 +36,9 @@ use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\GkeMultiCloud\V1\AwsCluster; +use Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AwsNodePool; +use Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServerConfig; use Google\Cloud\GkeMultiCloud\V1\CreateAwsClusterRequest; use Google\Cloud\GkeMultiCloud\V1\CreateAwsNodePoolRequest; @@ -44,11 +46,16 @@ use Google\Cloud\GkeMultiCloud\V1\DeleteAwsNodePoolRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAwsJsonWebKeysRequest; use Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAwsOpenIdConfigRequest; use Google\Cloud\GkeMultiCloud\V1\GetAwsServerConfigRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest; +use Google\Cloud\GkeMultiCloud\V1\RollbackAwsNodePoolUpdateRequest; use Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest; use Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest; use Google\LongRunning\Operation; @@ -71,11 +78,15 @@ * @method PromiseInterface deleteAwsClusterAsync(DeleteAwsClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteAwsNodePoolAsync(DeleteAwsNodePoolRequest $request, array $optionalArgs = []) * @method PromiseInterface generateAwsAccessTokenAsync(GenerateAwsAccessTokenRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAwsClusterAgentTokenAsync(GenerateAwsClusterAgentTokenRequest $request, array $optionalArgs = []) * @method PromiseInterface getAwsClusterAsync(GetAwsClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAwsJsonWebKeysAsync(GetAwsJsonWebKeysRequest $request, array $optionalArgs = []) * @method PromiseInterface getAwsNodePoolAsync(GetAwsNodePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAwsOpenIdConfigAsync(GetAwsOpenIdConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface getAwsServerConfigAsync(GetAwsServerConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface listAwsClustersAsync(ListAwsClustersRequest $request, array $optionalArgs = []) * @method PromiseInterface listAwsNodePoolsAsync(ListAwsNodePoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackAwsNodePoolUpdateAsync(RollbackAwsNodePoolUpdateRequest $request, array $optionalArgs = []) * @method PromiseInterface updateAwsClusterAsync(UpdateAwsClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface updateAwsNodePoolAsync(UpdateAwsNodePoolRequest $request, array $optionalArgs = []) */ @@ -485,6 +496,33 @@ public function generateAwsAccessToken(GenerateAwsAccessTokenRequest $request, a return $this->startApiCall('GenerateAwsAccessToken', $request, $callOptions)->wait(); } + /** + * Generates an access token for a cluster agent. + * + * The async variant is + * {@see AwsClustersClient::generateAwsClusterAgentTokenAsync()} . + * + * @example samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php + * + * @param GenerateAwsClusterAgentTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAwsClusterAgentTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAwsClusterAgentToken(GenerateAwsClusterAgentTokenRequest $request, array $callOptions = []): GenerateAwsClusterAgentTokenResponse + { + return $this->startApiCall('GenerateAwsClusterAgentToken', $request, $callOptions)->wait(); + } + /** * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] * resource. @@ -512,6 +550,33 @@ public function getAwsCluster(GetAwsClusterRequest $request, array $callOptions return $this->startApiCall('GetAwsCluster', $request, $callOptions)->wait(); } + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * The async variant is {@see AwsClustersClient::getAwsJsonWebKeysAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_json_web_keys.php + * + * @param GetAwsJsonWebKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsJsonWebKeys + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsJsonWebKeys(GetAwsJsonWebKeysRequest $request, array $callOptions = []): AwsJsonWebKeys + { + return $this->startApiCall('GetAwsJsonWebKeys', $request, $callOptions)->wait(); + } + /** * Describes a specific * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. @@ -539,6 +604,36 @@ public function getAwsNodePool(GetAwsNodePoolRequest $request, array $callOption return $this->startApiCall('GetAwsNodePool', $request, $callOptions)->wait(); } + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * The async variant is {@see AwsClustersClient::getAwsOpenIdConfigAsync()} . + * + * @example samples/V1/AwsClustersClient/get_aws_open_id_config.php + * + * @param GetAwsOpenIdConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AwsOpenIdConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAwsOpenIdConfig(GetAwsOpenIdConfigRequest $request, array $callOptions = []): AwsOpenIdConfig + { + return $this->startApiCall('GetAwsOpenIdConfig', $request, $callOptions)->wait(); + } + /** * Returns information, such as supported AWS regions and Kubernetes * versions, on a given Google Cloud location. @@ -621,6 +716,38 @@ public function listAwsNodePools(ListAwsNodePoolsRequest $request, array $callOp return $this->startApiCall('ListAwsNodePools', $request, $callOptions); } + /** + * Rolls back a previously aborted or failed + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. + * Makes no changes if the last update request successfully finished. + * If an update request is in progress, you cannot rollback the update. + * You must first cancel or let it finish unsuccessfully before you can + * rollback. + * + * The async variant is {@see AwsClustersClient::rollbackAwsNodePoolUpdateAsync()} + * . + * + * @example samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php + * + * @param RollbackAwsNodePoolUpdateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rollbackAwsNodePoolUpdate(RollbackAwsNodePoolUpdateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RollbackAwsNodePoolUpdate', $request, $callOptions)->wait(); + } + /** * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * diff --git a/GkeMultiCloud/src/V1/Client/AzureClustersClient.php b/GkeMultiCloud/src/V1/Client/AzureClustersClient.php index 8aa5b632ceb7..213ededb0949 100644 --- a/GkeMultiCloud/src/V1/Client/AzureClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AzureClustersClient.php @@ -37,7 +37,9 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\GkeMultiCloud\V1\AzureClient; use Google\Cloud\GkeMultiCloud\V1\AzureCluster; +use Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AzureNodePool; +use Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AzureServerConfig; use Google\Cloud\GkeMultiCloud\V1\CreateAzureClientRequest; use Google\Cloud\GkeMultiCloud\V1\CreateAzureClusterRequest; @@ -47,9 +49,13 @@ use Google\Cloud\GkeMultiCloud\V1\DeleteAzureNodePoolRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAzureJsonWebKeysRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAzureOpenIdConfigRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureServerConfigRequest; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest; use Google\Cloud\GkeMultiCloud\V1\ListAzureClustersRequest; @@ -78,9 +84,12 @@ * @method PromiseInterface deleteAzureClusterAsync(DeleteAzureClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteAzureNodePoolAsync(DeleteAzureNodePoolRequest $request, array $optionalArgs = []) * @method PromiseInterface generateAzureAccessTokenAsync(GenerateAzureAccessTokenRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAzureClusterAgentTokenAsync(GenerateAzureClusterAgentTokenRequest $request, array $optionalArgs = []) * @method PromiseInterface getAzureClientAsync(GetAzureClientRequest $request, array $optionalArgs = []) * @method PromiseInterface getAzureClusterAsync(GetAzureClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAzureJsonWebKeysAsync(GetAzureJsonWebKeysRequest $request, array $optionalArgs = []) * @method PromiseInterface getAzureNodePoolAsync(GetAzureNodePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAzureOpenIdConfigAsync(GetAzureOpenIdConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface getAzureServerConfigAsync(GetAzureServerConfigRequest $request, array $optionalArgs = []) * @method PromiseInterface listAzureClientsAsync(ListAzureClientsRequest $request, array $optionalArgs = []) * @method PromiseInterface listAzureClustersAsync(ListAzureClustersRequest $request, array $optionalArgs = []) @@ -585,6 +594,33 @@ public function generateAzureAccessToken(GenerateAzureAccessTokenRequest $reques return $this->startApiCall('GenerateAzureAccessToken', $request, $callOptions)->wait(); } + /** + * Generates an access token for a cluster agent. + * + * The async variant is + * {@see AzureClustersClient::generateAzureClusterAgentTokenAsync()} . + * + * @example samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php + * + * @param GenerateAzureClusterAgentTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAzureClusterAgentTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAzureClusterAgentToken(GenerateAzureClusterAgentTokenRequest $request, array $callOptions = []): GenerateAzureClusterAgentTokenResponse + { + return $this->startApiCall('GenerateAzureClusterAgentToken', $request, $callOptions)->wait(); + } + /** * Describes a specific * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. @@ -639,6 +675,33 @@ public function getAzureCluster(GetAzureClusterRequest $request, array $callOpti return $this->startApiCall('GetAzureCluster', $request, $callOptions)->wait(); } + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * The async variant is {@see AzureClustersClient::getAzureJsonWebKeysAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_json_web_keys.php + * + * @param GetAzureJsonWebKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureJsonWebKeys + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureJsonWebKeys(GetAzureJsonWebKeysRequest $request, array $callOptions = []): AzureJsonWebKeys + { + return $this->startApiCall('GetAzureJsonWebKeys', $request, $callOptions)->wait(); + } + /** * Describes a specific * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. @@ -666,6 +729,36 @@ public function getAzureNodePool(GetAzureNodePoolRequest $request, array $callOp return $this->startApiCall('GetAzureNodePool', $request, $callOptions)->wait(); } + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * The async variant is {@see AzureClustersClient::getAzureOpenIdConfigAsync()} . + * + * @example samples/V1/AzureClustersClient/get_azure_open_id_config.php + * + * @param GetAzureOpenIdConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AzureOpenIdConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAzureOpenIdConfig(GetAzureOpenIdConfigRequest $request, array $callOptions = []): AzureOpenIdConfig + { + return $this->startApiCall('GetAzureOpenIdConfig', $request, $callOptions)->wait(); + } + /** * Returns information, such as supported Azure regions and Kubernetes * versions, on a given Google Cloud location. diff --git a/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php index 79a319740af6..dcbb9b49fa1a 100644 --- a/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php @@ -18,7 +18,8 @@ class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message /** * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @@ -56,7 +57,8 @@ class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. * - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. Please see @@ -94,7 +96,8 @@ public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\Azur * @type string $parent * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool @@ -121,7 +124,8 @@ public function __construct($data = NULL) { /** * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @@ -136,7 +140,8 @@ public function getParent() /** * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * diff --git a/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php b/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php index b6c25081142f..3e8a3062036d 100644 --- a/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php @@ -42,6 +42,15 @@ class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool allow_missing = 3; */ private $allow_missing = false; + /** + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ignore_errors = false; /** * The current etag of the * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. @@ -95,6 +104,11 @@ public static function build(string $name): self * found, the request will succeed but no action will be taken on the server * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. + * @type bool $ignore_errors + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. * @type string $etag * The current etag of the * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. @@ -204,6 +218,38 @@ public function setAllowMissing($var) return $this; } + /** + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreErrors() + { + return $this->ignore_errors; + } + + /** + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreErrors($var) + { + GPBUtil::checkBool($var); + $this->ignore_errors = $var; + + return $this; + } + /** * The current etag of the * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. diff --git a/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php b/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php index 7c4d66a71ebe..057e37a0f1ec 100644 --- a/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php @@ -43,6 +43,15 @@ class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool allow_missing = 3; */ private $allow_missing = false; + /** + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ignore_errors = false; /** * The current ETag of the * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. @@ -97,6 +106,11 @@ public static function build(string $name): self * found, the request will succeed but no action will be taken on the server * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. + * @type bool $ignore_errors + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. * @type string $etag * The current ETag of the * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. @@ -208,6 +222,38 @@ public function setAllowMissing($var) return $this; } + /** + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreErrors() + { + return $this->ignore_errors; + } + + /** + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. + * + * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreErrors($var) + { + GPBUtil::checkBool($var); + $this->ignore_errors = $var; + + return $this; + } + /** * The current ETag of the * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. diff --git a/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php b/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php index b1ea86f133fc..eff1d4f4c3d4 100644 --- a/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for `Clusters.DeleteAzureCluster` method. + * Request message for `AzureClusters.DeleteAzureCluster` method. * * Generated from protobuf message google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest */ diff --git a/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php index e5dae821e371..bfe7dcb68d19 100644 --- a/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Delete message for `AzureClusters.DeleteAzureNodePool` method. + * Request message for `AzureClusters.DeleteAzureNodePool` method. * * Generated from protobuf message google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest */ diff --git a/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php b/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php index 6e74f78f7d49..f1bb957df66f 100644 --- a/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php +++ b/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php @@ -36,9 +36,12 @@ use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\GkeMultiCloud\V1\AttachedCluster; +use Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig; use Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig; use Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest; use Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse; use Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest; @@ -644,6 +647,100 @@ public function deleteAttachedCluster($name, array $optionalArgs = []) )->wait(); } + /** + * Generates an access token for a cluster agent. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedAttachedCluster = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + * $subjectToken = 'subject_token'; + * $subjectTokenType = 'subject_token_type'; + * $version = 'version'; + * $response = $attachedClustersClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $attachedCluster Required. + * @param string $subjectToken Required. + * @param string $subjectTokenType Required. + * @param string $version Required. + * @param array $optionalArgs { + * Optional. + * + * @type string $grantType + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requestedTokenType + * Optional. + * @type string $options + * Optional. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAttachedClusterAgentToken( + $attachedCluster, + $subjectToken, + $subjectTokenType, + $version, + array $optionalArgs = [] + ) { + $request = new GenerateAttachedClusterAgentTokenRequest(); + $requestParamHeaders = []; + $request->setAttachedCluster($attachedCluster); + $request->setSubjectToken($subjectToken); + $request->setSubjectTokenType($subjectTokenType); + $request->setVersion($version); + $requestParamHeaders['attached_cluster'] = $attachedCluster; + if (isset($optionalArgs['grantType'])) { + $request->setGrantType($optionalArgs['grantType']); + } + + if (isset($optionalArgs['audience'])) { + $request->setAudience($optionalArgs['audience']); + } + + if (isset($optionalArgs['scope'])) { + $request->setScope($optionalArgs['scope']); + } + + if (isset($optionalArgs['requestedTokenType'])) { + $request->setRequestedTokenType( + $optionalArgs['requestedTokenType'] + ); + } + + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GenerateAttachedClusterAgentToken', + GenerateAttachedClusterAgentTokenResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Generates the install manifest to be installed on the target cluster. * @@ -691,6 +788,8 @@ public function deleteAttachedCluster($name, array $optionalArgs = []) * @param array $optionalArgs { * Optional. * + * @type AttachedProxyConfig $proxyConfig + * Optional. Proxy configuration for outbound HTTP(S) traffic. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -713,6 +812,10 @@ public function generateAttachedClusterInstallManifest( $request->setAttachedClusterId($attachedClusterId); $request->setPlatformVersion($platformVersion); $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['proxyConfig'])) { + $request->setProxyConfig($optionalArgs['proxyConfig']); + } + $requestParams = new RequestParamsHeaderDescriptor( $requestParamHeaders ); @@ -914,6 +1017,8 @@ public function getAttachedServerConfig($name, array $optionalArgs = []) * * @type bool $validateOnly * If set, only validate the request, but do not actually import the cluster. + * @type AttachedProxyConfig $proxyConfig + * Optional. Proxy configuration for outbound HTTP(S) traffic. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -942,6 +1047,10 @@ public function importAttachedCluster( $request->setValidateOnly($optionalArgs['validateOnly']); } + if (isset($optionalArgs['proxyConfig'])) { + $request->setProxyConfig($optionalArgs['proxyConfig']); + } + $requestParams = new RequestParamsHeaderDescriptor( $requestParamHeaders ); @@ -1089,12 +1198,16 @@ public function listAttachedClusters($parent, array $optionalArgs = []) * fields from * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: * - * * `description`. * * `annotations`. - * * `platform_version`. + * * `authorization.admin_groups`. * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. * * `logging_config.component_config.enable_components`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. * @param array $optionalArgs { * Optional. * diff --git a/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php b/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php index f398a037c4a4..78bac170dca7 100644 --- a/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php +++ b/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php @@ -36,7 +36,9 @@ use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\GkeMultiCloud\V1\AwsCluster; +use Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AwsNodePool; +use Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServerConfig; use Google\Cloud\GkeMultiCloud\V1\CreateAwsClusterRequest; use Google\Cloud\GkeMultiCloud\V1\CreateAwsNodePoolRequest; @@ -44,13 +46,18 @@ use Google\Cloud\GkeMultiCloud\V1\DeleteAwsNodePoolRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAwsJsonWebKeysRequest; use Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAwsOpenIdConfigRequest; use Google\Cloud\GkeMultiCloud\V1\GetAwsServerConfigRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse; +use Google\Cloud\GkeMultiCloud\V1\RollbackAwsNodePoolUpdateRequest; use Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest; use Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest; use Google\LongRunning\Operation; @@ -738,6 +745,11 @@ public function createAwsNodePool( * and a completed [Operation][google.longrunning.Operation] will be returned. * * Useful for idempotent deletion. + * @type bool $ignoreErrors + * Optional. If set to true, the deletion of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. * @type string $etag * The current etag of the * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. @@ -770,6 +782,10 @@ public function deleteAwsCluster($name, array $optionalArgs = []) $request->setAllowMissing($optionalArgs['allowMissing']); } + if (isset($optionalArgs['ignoreErrors'])) { + $request->setIgnoreErrors($optionalArgs['ignoreErrors']); + } + if (isset($optionalArgs['etag'])) { $request->setEtag($optionalArgs['etag']); } @@ -851,6 +867,11 @@ public function deleteAwsCluster($name, array $optionalArgs = []) * and a completed [Operation][google.longrunning.Operation] will be returned. * * Useful for idempotent deletion. + * @type bool $ignoreErrors + * Optional. If set to true, the deletion of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will + * succeed even if errors occur during deleting in node pool resources. Using + * this parameter may result in orphaned resources in the node pool. * @type string $etag * The current ETag of the * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. @@ -883,6 +904,10 @@ public function deleteAwsNodePool($name, array $optionalArgs = []) $request->setAllowMissing($optionalArgs['allowMissing']); } + if (isset($optionalArgs['ignoreErrors'])) { + $request->setIgnoreErrors($optionalArgs['ignoreErrors']); + } + if (isset($optionalArgs['etag'])) { $request->setEtag($optionalArgs['etag']); } @@ -960,6 +985,106 @@ public function generateAwsAccessToken( )->wait(); } + /** + * Generates an access token for a cluster agent. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $subjectToken = 'subject_token'; + * $subjectTokenType = 'subject_token_type'; + * $version = 'version'; + * $response = $awsClustersClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. + * @param string $subjectToken Required. + * @param string $subjectTokenType Required. + * @param string $version Required. + * @param array $optionalArgs { + * Optional. + * + * @type string $nodePoolId + * Optional. + * @type string $grantType + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requestedTokenType + * Optional. + * @type string $options + * Optional. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAwsClusterAgentToken( + $awsCluster, + $subjectToken, + $subjectTokenType, + $version, + array $optionalArgs = [] + ) { + $request = new GenerateAwsClusterAgentTokenRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $request->setSubjectToken($subjectToken); + $request->setSubjectTokenType($subjectTokenType); + $request->setVersion($version); + $requestParamHeaders['aws_cluster'] = $awsCluster; + if (isset($optionalArgs['nodePoolId'])) { + $request->setNodePoolId($optionalArgs['nodePoolId']); + } + + if (isset($optionalArgs['grantType'])) { + $request->setGrantType($optionalArgs['grantType']); + } + + if (isset($optionalArgs['audience'])) { + $request->setAudience($optionalArgs['audience']); + } + + if (isset($optionalArgs['scope'])) { + $request->setScope($optionalArgs['scope']); + } + + if (isset($optionalArgs['requestedTokenType'])) { + $request->setRequestedTokenType( + $optionalArgs['requestedTokenType'] + ); + } + + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GenerateAwsClusterAgentToken', + GenerateAwsClusterAgentTokenResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] * resource. @@ -1017,6 +1142,57 @@ public function getAwsCluster($name, array $optionalArgs = []) )->wait(); } + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $response = $awsClustersClient->getAwsJsonWebKeys($formattedAwsCluster); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. The AwsCluster, which owns the JsonWebKeys. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys + * + * @throws ApiException if the remote call fails + */ + public function getAwsJsonWebKeys($awsCluster, array $optionalArgs = []) + { + $request = new GetAwsJsonWebKeysRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $requestParamHeaders['aws_cluster'] = $awsCluster; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetAwsJsonWebKeys', + AwsJsonWebKeys::class, + $optionalArgs, + $request + )->wait(); + } + /** * Describes a specific * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. @@ -1074,6 +1250,60 @@ public function getAwsNodePool($name, array $optionalArgs = []) )->wait(); } + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + * $response = $awsClustersClient->getAwsOpenIdConfig($formattedAwsCluster); + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $awsCluster Required. The AwsCluster, which owns the OIDC discovery document. + * Format: + * projects/{project}/locations/{location}/awsClusters/{cluster} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig + * + * @throws ApiException if the remote call fails + */ + public function getAwsOpenIdConfig($awsCluster, array $optionalArgs = []) + { + $request = new GetAwsOpenIdConfigRequest(); + $requestParamHeaders = []; + $request->setAwsCluster($awsCluster); + $requestParamHeaders['aws_cluster'] = $awsCluster; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetAwsOpenIdConfig', + AwsOpenIdConfig::class, + $optionalArgs, + $request + )->wait(); + } + /** * Returns information, such as supported AWS regions and Kubernetes * versions, on a given Google Cloud location. @@ -1301,6 +1531,99 @@ public function listAwsNodePools($parent, array $optionalArgs = []) ); } + /** + * Rolls back a previously aborted or failed + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. + * Makes no changes if the last update request successfully finished. + * If an update request is in progress, you cannot rollback the update. + * You must first cancel or let it finish unsuccessfully before you can + * rollback. + * + * Sample code: + * ``` + * $awsClustersClient = new AwsClustersClient(); + * try { + * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + * $operationResponse = $awsClustersClient->rollbackAwsNodePoolUpdate($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $awsClustersClient->rollbackAwsNodePoolUpdate($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'rollbackAwsNodePoolUpdate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $awsClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * rollback. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $respectPdb + * Optional. Option for rollback to ignore the PodDisruptionBudget when + * draining the node pool nodes. Default value is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function rollbackAwsNodePoolUpdate($name, array $optionalArgs = []) + { + $request = new RollbackAwsNodePoolUpdateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['respectPdb'])) { + $request->setRespectPdb($optionalArgs['respectPdb']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'RollbackAwsNodePoolUpdate', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + /** * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * @@ -1351,6 +1674,8 @@ public function listAwsNodePools($parent, array $optionalArgs = []) * * `annotations`. * * `control_plane.version`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. * * `control_plane.aws_services_authentication.role_arn`. * * `control_plane.aws_services_authentication.role_session_name`. * * `control_plane.config_encryption.kms_key_arn`. @@ -1362,6 +1687,7 @@ public function listAwsNodePools($parent, array $optionalArgs = []) * * `control_plane.root_volume.size_gib`. * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. * * `control_plane.root_volume.kms_key_arn`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. @@ -1370,6 +1696,7 @@ public function listAwsNodePools($parent, array $optionalArgs = []) * * `logging_config.component_config.enable_components`. * * `control_plane.tags`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. * @param array $optionalArgs { * Optional. * @@ -1466,6 +1793,7 @@ public function updateAwsCluster( * * `config.config_encryption.kms_key_arn`. * * `config.security_group_ids`. * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. * * `config.root_volume.kms_key_arn`. * * `config.root_volume.volume_type`. * * `config.root_volume.size_gib`. @@ -1481,6 +1809,13 @@ public function updateAwsCluster( * * `config.autoscaling_metrics_collection`. * * `config.autoscaling_metrics_collection.granularity`. * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. * @param array $optionalArgs { * Optional. * diff --git a/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php b/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php index db8cd50f8682..10fdadb26390 100644 --- a/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php +++ b/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php @@ -37,7 +37,9 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\GkeMultiCloud\V1\AzureClient; use Google\Cloud\GkeMultiCloud\V1\AzureCluster; +use Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AzureNodePool; +use Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AzureServerConfig; use Google\Cloud\GkeMultiCloud\V1\CreateAzureClientRequest; use Google\Cloud\GkeMultiCloud\V1\CreateAzureClusterRequest; @@ -47,9 +49,13 @@ use Google\Cloud\GkeMultiCloud\V1\DeleteAzureNodePoolRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAzureJsonWebKeysRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAzureOpenIdConfigRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureServerConfigRequest; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse; @@ -766,7 +772,8 @@ public function createAzureCluster( * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] * resource where this node pool will be created. * - * Location names are formatted as `projects//locations/`. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -1180,7 +1187,7 @@ public function deleteAzureNodePool($name, array $optionalArgs = []) * authenticate to. * * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. + * `projects//locations//azureClusters/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -1219,6 +1226,106 @@ public function generateAzureAccessToken( )->wait(); } + /** + * Generates an access token for a cluster agent. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $subjectToken = 'subject_token'; + * $subjectTokenType = 'subject_token_type'; + * $version = 'version'; + * $response = $azureClustersClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. + * @param string $subjectToken Required. + * @param string $subjectTokenType Required. + * @param string $version Required. + * @param array $optionalArgs { + * Optional. + * + * @type string $nodePoolId + * Optional. + * @type string $grantType + * Optional. + * @type string $audience + * Optional. + * @type string $scope + * Optional. + * @type string $requestedTokenType + * Optional. + * @type string $options + * Optional. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAzureClusterAgentToken( + $azureCluster, + $subjectToken, + $subjectTokenType, + $version, + array $optionalArgs = [] + ) { + $request = new GenerateAzureClusterAgentTokenRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $request->setSubjectToken($subjectToken); + $request->setSubjectTokenType($subjectTokenType); + $request->setVersion($version); + $requestParamHeaders['azure_cluster'] = $azureCluster; + if (isset($optionalArgs['nodePoolId'])) { + $request->setNodePoolId($optionalArgs['nodePoolId']); + } + + if (isset($optionalArgs['grantType'])) { + $request->setGrantType($optionalArgs['grantType']); + } + + if (isset($optionalArgs['audience'])) { + $request->setAudience($optionalArgs['audience']); + } + + if (isset($optionalArgs['scope'])) { + $request->setScope($optionalArgs['scope']); + } + + if (isset($optionalArgs['requestedTokenType'])) { + $request->setRequestedTokenType( + $optionalArgs['requestedTokenType'] + ); + } + + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GenerateAzureClusterAgentToken', + GenerateAzureClusterAgentTokenResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Describes a specific * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. @@ -1334,6 +1441,57 @@ public function getAzureCluster($name, array $optionalArgs = []) )->wait(); } + /** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $response = $azureClustersClient->getAzureJsonWebKeys($formattedAzureCluster); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys. + * Format: + * projects//locations//azureClusters/ + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys + * + * @throws ApiException if the remote call fails + */ + public function getAzureJsonWebKeys($azureCluster, array $optionalArgs = []) + { + $request = new GetAzureJsonWebKeysRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $requestParamHeaders['azure_cluster'] = $azureCluster; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetAzureJsonWebKeys', + AzureJsonWebKeys::class, + $optionalArgs, + $request + )->wait(); + } + /** * Describes a specific * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. @@ -1391,6 +1549,62 @@ public function getAzureNodePool($name, array $optionalArgs = []) )->wait(); } + /** + * Gets the OIDC discovery document for the cluster. + * See the + * [OpenID Connect Discovery 1.0 + * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) + * for details. + * + * Sample code: + * ``` + * $azureClustersClient = new AzureClustersClient(); + * try { + * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + * $response = $azureClustersClient->getAzureOpenIdConfig($formattedAzureCluster); + * } finally { + * $azureClustersClient->close(); + * } + * ``` + * + * @param string $azureCluster Required. The AzureCluster, which owns the OIDC discovery document. + * Format: + * projects//locations//azureClusters/ + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig + * + * @throws ApiException if the remote call fails + */ + public function getAzureOpenIdConfig( + $azureCluster, + array $optionalArgs = [] + ) { + $request = new GetAzureOpenIdConfigRequest(); + $requestParamHeaders = []; + $request->setAzureCluster($azureCluster); + $requestParamHeaders['azure_cluster'] = $azureCluster; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetAzureOpenIdConfig', + AzureOpenIdConfig::class, + $optionalArgs, + $request + )->wait(); + } + /** * Returns information, such as supported Azure regions and Kubernetes * versions, on a given Google Cloud location. @@ -1754,6 +1968,7 @@ public function listAzureNodePools($parent, array $optionalArgs = []) * * `control_plane.vm_size`. * * `annotations`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. * * `control_plane.root_volume.size_gib`. * * `azure_services_authentication`. * * `azure_services_authentication.tenant_id`. @@ -1858,6 +2073,8 @@ public function updateAzureCluster( * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. * @param array $optionalArgs { * Optional. * diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php b/GkeMultiCloud/src/V1/GenerateAttachedClusterAgentTokenRequest.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php rename to GkeMultiCloud/src/V1/GenerateAttachedClusterAgentTokenRequest.php index 121afc3898f2..fde47479c79c 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAttachedClusterAgentTokenRequest.php @@ -18,55 +18,55 @@ class GenerateAttachedClusterAgentTokenRequest extends \Google\Protobuf\Internal * * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $attached_cluster = ''; + private $attached_cluster = ''; /** * Required. * * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; */ - protected $subject_token = ''; + private $subject_token = ''; /** * Required. * * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; */ - protected $subject_token_type = ''; + private $subject_token_type = ''; /** * Required. * * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; */ - protected $version = ''; + private $version = ''; /** * Optional. * * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $grant_type = ''; + private $grant_type = ''; /** * Optional. * * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $audience = ''; + private $audience = ''; /** * Optional. * * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $scope = ''; + private $scope = ''; /** * Optional. * * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $requested_token_type = ''; + private $requested_token_type = ''; /** * Optional. * * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $options = ''; + private $options = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php b/GkeMultiCloud/src/V1/GenerateAttachedClusterAgentTokenResponse.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php rename to GkeMultiCloud/src/V1/GenerateAttachedClusterAgentTokenResponse.php index 913a5f2ab892..30b9d51af243 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php +++ b/GkeMultiCloud/src/V1/GenerateAttachedClusterAgentTokenResponse.php @@ -16,15 +16,15 @@ class GenerateAttachedClusterAgentTokenResponse extends \Google\Protobuf\Interna /** * Generated from protobuf field string access_token = 1; */ - protected $access_token = ''; + private $access_token = ''; /** * Generated from protobuf field int32 expires_in = 2; */ - protected $expires_in = 0; + private $expires_in = 0; /** * Generated from protobuf field string token_type = 3; */ - protected $token_type = ''; + private $token_type = ''; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php b/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php index bdd8aa78dc74..37124a28c892 100644 --- a/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php @@ -52,6 +52,12 @@ class GenerateAttachedClusterInstallManifestRequest extends \Google\Protobuf\Int * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; */ private $platform_version = ''; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $proxy_config = null; /** * @param string $parent Required. The parent location where this @@ -120,6 +126,8 @@ public static function build(string $parent, string $attachedClusterId): self * You can list all supported versions on a given Google Cloud region by * calling * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. * } */ public function __construct($data = NULL) { @@ -241,5 +249,41 @@ public function setPlatformVersion($var) return $this; } + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php b/GkeMultiCloud/src/V1/GenerateAwsClusterAgentTokenRequest.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php rename to GkeMultiCloud/src/V1/GenerateAwsClusterAgentTokenRequest.php index 16461659a451..2f6c3265b9af 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAwsClusterAgentTokenRequest.php @@ -18,61 +18,61 @@ class GenerateAwsClusterAgentTokenRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $aws_cluster = ''; + private $aws_cluster = ''; /** * Required. * * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; */ - protected $subject_token = ''; + private $subject_token = ''; /** * Required. * * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; */ - protected $subject_token_type = ''; + private $subject_token_type = ''; /** * Required. * * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; */ - protected $version = ''; + private $version = ''; /** * Optional. * * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $node_pool_id = ''; + private $node_pool_id = ''; /** * Optional. * * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $grant_type = ''; + private $grant_type = ''; /** * Optional. * * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $audience = ''; + private $audience = ''; /** * Optional. * * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $scope = ''; + private $scope = ''; /** * Optional. * * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $requested_token_type = ''; + private $requested_token_type = ''; /** * Optional. * * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $options = ''; + private $options = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php b/GkeMultiCloud/src/V1/GenerateAwsClusterAgentTokenResponse.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php rename to GkeMultiCloud/src/V1/GenerateAwsClusterAgentTokenResponse.php index 0a5d0bafb1b3..926e327afd26 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php +++ b/GkeMultiCloud/src/V1/GenerateAwsClusterAgentTokenResponse.php @@ -16,15 +16,15 @@ class GenerateAwsClusterAgentTokenResponse extends \Google\Protobuf\Internal\Mes /** * Generated from protobuf field string access_token = 1; */ - protected $access_token = ''; + private $access_token = ''; /** * Generated from protobuf field int32 expires_in = 2; */ - protected $expires_in = 0; + private $expires_in = 0; /** * Generated from protobuf field string token_type = 3; */ - protected $token_type = ''; + private $token_type = ''; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php b/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php index 48792bbbb197..dfcb60d9816a 100644 --- a/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php @@ -20,7 +20,7 @@ class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to * authenticate to. * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @@ -39,7 +39,7 @@ class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to * authenticate to. * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * } @@ -54,7 +54,7 @@ public function __construct($data = NULL) { * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to * authenticate to. * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @@ -71,7 +71,7 @@ public function getAzureCluster() * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to * authenticate to. * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. + * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php b/GkeMultiCloud/src/V1/GenerateAzureClusterAgentTokenRequest.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php rename to GkeMultiCloud/src/V1/GenerateAzureClusterAgentTokenRequest.php index d19114785203..74b1ffe3ecbe 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAzureClusterAgentTokenRequest.php @@ -18,61 +18,61 @@ class GenerateAzureClusterAgentTokenRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $azure_cluster = ''; + private $azure_cluster = ''; /** * Required. * * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; */ - protected $subject_token = ''; + private $subject_token = ''; /** * Required. * * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; */ - protected $subject_token_type = ''; + private $subject_token_type = ''; /** * Required. * * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; */ - protected $version = ''; + private $version = ''; /** * Optional. * * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $node_pool_id = ''; + private $node_pool_id = ''; /** * Optional. * * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $grant_type = ''; + private $grant_type = ''; /** * Optional. * * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $audience = ''; + private $audience = ''; /** * Optional. * * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $scope = ''; + private $scope = ''; /** * Optional. * * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $requested_token_type = ''; + private $requested_token_type = ''; /** * Optional. * * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $options = ''; + private $options = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php b/GkeMultiCloud/src/V1/GenerateAzureClusterAgentTokenResponse.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php rename to GkeMultiCloud/src/V1/GenerateAzureClusterAgentTokenResponse.php index beb176c6239a..a2a9e7c343ae 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php +++ b/GkeMultiCloud/src/V1/GenerateAzureClusterAgentTokenResponse.php @@ -16,15 +16,15 @@ class GenerateAzureClusterAgentTokenResponse extends \Google\Protobuf\Internal\M /** * Generated from protobuf field string access_token = 1; */ - protected $access_token = ''; + private $access_token = ''; /** * Generated from protobuf field int32 expires_in = 2; */ - protected $expires_in = 0; + private $expires_in = 0; /** * Generated from protobuf field string token_type = 3; */ - protected $token_type = ''; + private $token_type = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php b/GkeMultiCloud/src/V1/GetAwsJsonWebKeysRequest.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php rename to GkeMultiCloud/src/V1/GetAwsJsonWebKeysRequest.php index 7e334e021db1..1949aa15a6d8 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php +++ b/GkeMultiCloud/src/V1/GetAwsJsonWebKeysRequest.php @@ -25,7 +25,7 @@ class GetAwsJsonWebKeysRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $aws_cluster = ''; + private $aws_cluster = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php b/GkeMultiCloud/src/V1/GetAwsOpenIdConfigRequest.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php rename to GkeMultiCloud/src/V1/GetAwsOpenIdConfigRequest.php index e1e5b395ff9f..34bedc89feb3 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php +++ b/GkeMultiCloud/src/V1/GetAwsOpenIdConfigRequest.php @@ -23,7 +23,7 @@ class GetAwsOpenIdConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $aws_cluster = ''; + private $aws_cluster = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php b/GkeMultiCloud/src/V1/GetAzureJsonWebKeysRequest.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php rename to GkeMultiCloud/src/V1/GetAzureJsonWebKeysRequest.php index b4613f999d14..8e6ec041d75d 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php +++ b/GkeMultiCloud/src/V1/GetAzureJsonWebKeysRequest.php @@ -25,7 +25,7 @@ class GetAzureJsonWebKeysRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $azure_cluster = ''; + private $azure_cluster = ''; /** * @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php b/GkeMultiCloud/src/V1/GetAzureOpenIdConfigRequest.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php rename to GkeMultiCloud/src/V1/GetAzureOpenIdConfigRequest.php index bb7336cfb5ff..9aa781d844be 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php +++ b/GkeMultiCloud/src/V1/GetAzureOpenIdConfigRequest.php @@ -23,7 +23,7 @@ class GetAzureOpenIdConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $azure_cluster = ''; + private $azure_cluster = ''; /** * @param string $azureCluster Required. The AzureCluster, which owns the OIDC discovery document. diff --git a/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php b/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php index 934c9bcd1497..af0c7083c3ad 100644 --- a/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php +++ b/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php @@ -54,6 +54,12 @@ class ImportAttachedClusterRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; */ private $distribution = ''; + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $proxy_config = null; /** * @param string $parent Required. The parent location where this @@ -103,6 +109,8 @@ public static function build(string $parent, string $fleetMembership): self * @type string $distribution * Required. The Kubernetes distribution of the underlying attached cluster. * Supported values: ["eks", "aks"]. + * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config + * Optional. Proxy configuration for outbound HTTP(S) traffic. * } */ public function __construct($data = NULL) { @@ -258,5 +266,41 @@ public function setDistribution($var) return $this; } + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null + */ + public function getProxyConfig() + { + return $this->proxy_config; + } + + public function hasProxyConfig() + { + return isset($this->proxy_config); + } + + public function clearProxyConfig() + { + unset($this->proxy_config); + } + + /** + * Optional. Proxy configuration for outbound HTTP(S) traffic. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var + * @return $this + */ + public function setProxyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); + $this->proxy_config = $var; + + return $this; + } + } diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php b/GkeMultiCloud/src/V1/Jwk.php similarity index 96% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php rename to GkeMultiCloud/src/V1/Jwk.php index b1c701bfc4c4..f89b16b53100 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php +++ b/GkeMultiCloud/src/V1/Jwk.php @@ -20,55 +20,55 @@ class Jwk extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string kty = 1; */ - protected $kty = ''; + private $kty = ''; /** * Algorithm. * * Generated from protobuf field string alg = 2; */ - protected $alg = ''; + private $alg = ''; /** * Permitted uses for the public keys. * * Generated from protobuf field string use = 3; */ - protected $use = ''; + private $use = ''; /** * Key ID. * * Generated from protobuf field string kid = 4; */ - protected $kid = ''; + private $kid = ''; /** * Used for RSA keys. * * Generated from protobuf field string n = 5; */ - protected $n = ''; + private $n = ''; /** * Used for RSA keys. * * Generated from protobuf field string e = 6; */ - protected $e = ''; + private $e = ''; /** * Used for ECDSA keys. * * Generated from protobuf field string x = 7; */ - protected $x = ''; + private $x = ''; /** * Used for ECDSA keys. * * Generated from protobuf field string y = 8; */ - protected $y = ''; + private $y = ''; /** * Used for ECDSA keys. * * Generated from protobuf field string crv = 9; */ - protected $crv = ''; + private $crv = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php b/GkeMultiCloud/src/V1/KubernetesSecret.php similarity index 97% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php rename to GkeMultiCloud/src/V1/KubernetesSecret.php index 48dc2a01caff..ebf9f12020f9 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php +++ b/GkeMultiCloud/src/V1/KubernetesSecret.php @@ -20,13 +20,13 @@ class KubernetesSecret extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Namespace in which the kubernetes secret is stored. * * Generated from protobuf field string namespace = 2; */ - protected $namespace = ''; + private $namespace = ''; /** * Constructor. diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php b/GkeMultiCloud/src/V1/RollbackAwsNodePoolUpdateRequest.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php rename to GkeMultiCloud/src/V1/RollbackAwsNodePoolUpdateRequest.php index 6d5b8a8bbc0d..90985f4303be 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php +++ b/GkeMultiCloud/src/V1/RollbackAwsNodePoolUpdateRequest.php @@ -26,14 +26,14 @@ class RollbackAwsNodePoolUpdateRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $name = ''; + private $name = ''; /** * Optional. Option for rollback to ignore the PodDisruptionBudget when * draining the node pool nodes. Default value is false. * * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $respect_pdb = false; + private $respect_pdb = false; /** * @param string $name Required. The name of the diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php b/GkeMultiCloud/src/V1/SpotConfig.php similarity index 100% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php rename to GkeMultiCloud/src/V1/SpotConfig.php diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php b/GkeMultiCloud/src/V1/SurgeSettings.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php rename to GkeMultiCloud/src/V1/SurgeSettings.php index 80494e596f75..485291032dff 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php +++ b/GkeMultiCloud/src/V1/SurgeSettings.php @@ -21,7 +21,7 @@ class SurgeSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $max_surge = 0; + private $max_surge = 0; /** * Optional. The maximum number of nodes that can be simultaneously * unavailable during the update process. A node is considered unavailable if @@ -29,7 +29,7 @@ class SurgeSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $max_unavailable = 0; + private $max_unavailable = 0; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php b/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php index e140ffe081a1..a1ab170ed899 100644 --- a/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php @@ -34,12 +34,16 @@ class UpdateAttachedClusterRequest extends \Google\Protobuf\Internal\Message * this field. The elements of the repeated paths field can only include these * fields from * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `description`. * * `annotations`. - * * `platform_version`. + * * `authorization.admin_groups`. * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. * * `logging_config.component_config.enable_components`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -54,12 +58,16 @@ class UpdateAttachedClusterRequest extends \Google\Protobuf\Internal\Message * fields from * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: * - * * `description`. * * `annotations`. - * * `platform_version`. + * * `authorization.admin_groups`. * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. * * `logging_config.component_config.enable_components`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. * * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest * @@ -89,12 +97,16 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AttachedCluster $att * this field. The elements of the repeated paths field can only include these * fields from * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `description`. * * `annotations`. - * * `platform_version`. + * * `authorization.admin_groups`. * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. * * `logging_config.component_config.enable_components`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. * } */ public function __construct($data = NULL) { @@ -173,12 +185,16 @@ public function setValidateOnly($var) * this field. The elements of the repeated paths field can only include these * fields from * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `description`. * * `annotations`. - * * `platform_version`. + * * `authorization.admin_groups`. * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. * * `logging_config.component_config.enable_components`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -203,12 +219,16 @@ public function clearUpdateMask() * this field. The elements of the repeated paths field can only include these * fields from * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `description`. * * `annotations`. - * * `platform_version`. + * * `authorization.admin_groups`. * * `authorization.admin_users`. + * * `binary_authorization.evaluation_mode`. + * * `description`. * * `logging_config.component_config.enable_components`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `platform_version`. + * * `proxy_config.kubernetes_secret.name`. + * * `proxy_config.kubernetes_secret.namespace`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php b/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php index 7cad294bf907..279d5052d8e7 100644 --- a/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php @@ -36,6 +36,8 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `annotations`. * * `control_plane.version`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. * * `control_plane.aws_services_authentication.role_arn`. * * `control_plane.aws_services_authentication.role_session_name`. * * `control_plane.config_encryption.kms_key_arn`. @@ -47,6 +49,7 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `control_plane.root_volume.size_gib`. * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. * * `control_plane.root_volume.kms_key_arn`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. @@ -55,6 +58,7 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `logging_config.component_config.enable_components`. * * `control_plane.tags`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; */ @@ -71,6 +75,8 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `annotations`. * * `control_plane.version`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. * * `control_plane.aws_services_authentication.role_arn`. * * `control_plane.aws_services_authentication.role_session_name`. * * `control_plane.config_encryption.kms_key_arn`. @@ -82,6 +88,7 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `control_plane.root_volume.size_gib`. * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. * * `control_plane.root_volume.kms_key_arn`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. @@ -90,6 +97,7 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `logging_config.component_config.enable_components`. * * `control_plane.tags`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. * * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest * @@ -121,6 +129,8 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsClust * * `annotations`. * * `control_plane.version`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. * * `control_plane.aws_services_authentication.role_arn`. * * `control_plane.aws_services_authentication.role_session_name`. * * `control_plane.config_encryption.kms_key_arn`. @@ -132,6 +142,7 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsClust * * `control_plane.root_volume.size_gib`. * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. * * `control_plane.root_volume.kms_key_arn`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. @@ -140,6 +151,7 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsClust * * `logging_config.component_config.enable_components`. * * `control_plane.tags`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. * } */ public function __construct($data = NULL) { @@ -219,6 +231,8 @@ public function setValidateOnly($var) * * `annotations`. * * `control_plane.version`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. * * `control_plane.aws_services_authentication.role_arn`. * * `control_plane.aws_services_authentication.role_session_name`. * * `control_plane.config_encryption.kms_key_arn`. @@ -230,6 +244,7 @@ public function setValidateOnly($var) * * `control_plane.root_volume.size_gib`. * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. * * `control_plane.root_volume.kms_key_arn`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. @@ -238,6 +253,7 @@ public function setValidateOnly($var) * * `logging_config.component_config.enable_components`. * * `control_plane.tags`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -265,6 +281,8 @@ public function clearUpdateMask() * * `annotations`. * * `control_plane.version`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. + * * `binary_authorization.evaluation_mode`. * * `control_plane.aws_services_authentication.role_arn`. * * `control_plane.aws_services_authentication.role_session_name`. * * `control_plane.config_encryption.kms_key_arn`. @@ -276,6 +294,7 @@ public function clearUpdateMask() * * `control_plane.root_volume.size_gib`. * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.throughput`. * * `control_plane.root_volume.kms_key_arn`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. @@ -284,6 +303,7 @@ public function clearUpdateMask() * * `logging_config.component_config.enable_components`. * * `control_plane.tags`. * * `monitoring_config.managed_prometheus_config.enabled`. + * * `networking.per_node_pool_sg_rules_disabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php b/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php index ec398db6a8f1..924292883975 100644 --- a/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php @@ -39,6 +39,7 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * * `config.config_encryption.kms_key_arn`. * * `config.security_group_ids`. * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. * * `config.root_volume.kms_key_arn`. * * `config.root_volume.volume_type`. * * `config.root_volume.size_gib`. @@ -54,6 +55,13 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * * `config.autoscaling_metrics_collection`. * * `config.autoscaling_metrics_collection.granularity`. * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -73,6 +81,7 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * * `config.config_encryption.kms_key_arn`. * * `config.security_group_ids`. * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. * * `config.root_volume.kms_key_arn`. * * `config.root_volume.volume_type`. * * `config.root_volume.size_gib`. @@ -88,6 +97,13 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * * `config.autoscaling_metrics_collection`. * * `config.autoscaling_metrics_collection.granularity`. * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. * * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest * @@ -122,6 +138,7 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNode * * `config.config_encryption.kms_key_arn`. * * `config.security_group_ids`. * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. * * `config.root_volume.kms_key_arn`. * * `config.root_volume.volume_type`. * * `config.root_volume.size_gib`. @@ -137,6 +154,13 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNode * * `config.autoscaling_metrics_collection`. * * `config.autoscaling_metrics_collection.granularity`. * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. * } */ public function __construct($data = NULL) { @@ -219,6 +243,7 @@ public function setValidateOnly($var) * * `config.config_encryption.kms_key_arn`. * * `config.security_group_ids`. * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. * * `config.root_volume.kms_key_arn`. * * `config.root_volume.volume_type`. * * `config.root_volume.size_gib`. @@ -234,6 +259,13 @@ public function setValidateOnly($var) * * `config.autoscaling_metrics_collection`. * * `config.autoscaling_metrics_collection.granularity`. * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -264,6 +296,7 @@ public function clearUpdateMask() * * `config.config_encryption.kms_key_arn`. * * `config.security_group_ids`. * * `config.root_volume.iops`. + * * `config.root_volume.throughput`. * * `config.root_volume.kms_key_arn`. * * `config.root_volume.volume_type`. * * `config.root_volume.size_gib`. @@ -279,6 +312,13 @@ public function clearUpdateMask() * * `config.autoscaling_metrics_collection`. * * `config.autoscaling_metrics_collection.granularity`. * * `config.autoscaling_metrics_collection.metrics`. + * * `config.instance_type`. + * * `management.auto_repair`. + * * `management`. + * * `update_settings`. + * * `update_settings.surge_settings`. + * * `update_settings.surge_settings.max_surge`. + * * `update_settings.surge_settings.max_unavailable`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php b/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php index 2d5c00754b6d..ad9a78e9826b 100644 --- a/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php @@ -38,6 +38,7 @@ class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message * * `control_plane.vm_size`. * * `annotations`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. * * `control_plane.root_volume.size_gib`. * * `azure_services_authentication`. * * `azure_services_authentication.tenant_id`. @@ -66,6 +67,7 @@ class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message * * `control_plane.vm_size`. * * `annotations`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. * * `control_plane.root_volume.size_gib`. * * `azure_services_authentication`. * * `azure_services_authentication.tenant_id`. @@ -109,6 +111,7 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureC * * `control_plane.vm_size`. * * `annotations`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. * * `control_plane.root_volume.size_gib`. * * `azure_services_authentication`. * * `azure_services_authentication.tenant_id`. @@ -200,6 +203,7 @@ public function setValidateOnly($var) * * `control_plane.vm_size`. * * `annotations`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. * * `control_plane.root_volume.size_gib`. * * `azure_services_authentication`. * * `azure_services_authentication.tenant_id`. @@ -239,6 +243,7 @@ public function clearUpdateMask() * * `control_plane.vm_size`. * * `annotations`. * * `authorization.admin_users`. + * * `authorization.admin_groups`. * * `control_plane.root_volume.size_gib`. * * `azure_services_authentication`. * * `azure_services_authentication.tenant_id`. diff --git a/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php index 050bbdc857e1..3ff6adc3ec5e 100644 --- a/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php @@ -37,6 +37,8 @@ class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -54,6 +56,8 @@ class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. * * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureNodePoolRequest * @@ -86,6 +90,8 @@ public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. * } */ public function __construct($data = NULL) { @@ -166,6 +172,8 @@ public function setValidateOnly($var) * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -194,6 +202,8 @@ public function clearUpdateMask() * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. * * `config.ssh_config.authorized_key`. + * * `management.auto_repair`. + * * `management`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php b/GkeMultiCloud/src/V1/UpdateSettings.php similarity index 98% rename from owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php rename to GkeMultiCloud/src/V1/UpdateSettings.php index 69dd63b604e0..95f5635ea2eb 100644 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php +++ b/GkeMultiCloud/src/V1/UpdateSettings.php @@ -39,7 +39,7 @@ class UpdateSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $surge_settings = null; + private $surge_settings = null; /** * Constructor. diff --git a/GkeMultiCloud/src/V1/gapic_metadata.json b/GkeMultiCloud/src/V1/gapic_metadata.json index a69240b06fba..511a1a11b279 100644 --- a/GkeMultiCloud/src/V1/gapic_metadata.json +++ b/GkeMultiCloud/src/V1/gapic_metadata.json @@ -20,6 +20,11 @@ "deleteAttachedCluster" ] }, + "GenerateAttachedClusterAgentToken": { + "methods": [ + "generateAttachedClusterAgentToken" + ] + }, "GenerateAttachedClusterInstallManifest": { "methods": [ "generateAttachedClusterInstallManifest" @@ -84,16 +89,31 @@ "generateAwsAccessToken" ] }, + "GenerateAwsClusterAgentToken": { + "methods": [ + "generateAwsClusterAgentToken" + ] + }, "GetAwsCluster": { "methods": [ "getAwsCluster" ] }, + "GetAwsJsonWebKeys": { + "methods": [ + "getAwsJsonWebKeys" + ] + }, "GetAwsNodePool": { "methods": [ "getAwsNodePool" ] }, + "GetAwsOpenIdConfig": { + "methods": [ + "getAwsOpenIdConfig" + ] + }, "GetAwsServerConfig": { "methods": [ "getAwsServerConfig" @@ -109,6 +129,11 @@ "listAwsNodePools" ] }, + "RollbackAwsNodePoolUpdate": { + "methods": [ + "rollbackAwsNodePoolUpdate" + ] + }, "UpdateAwsCluster": { "methods": [ "updateAwsCluster" @@ -163,6 +188,11 @@ "generateAzureAccessToken" ] }, + "GenerateAzureClusterAgentToken": { + "methods": [ + "generateAzureClusterAgentToken" + ] + }, "GetAzureClient": { "methods": [ "getAzureClient" @@ -173,11 +203,21 @@ "getAzureCluster" ] }, + "GetAzureJsonWebKeys": { + "methods": [ + "getAzureJsonWebKeys" + ] + }, "GetAzureNodePool": { "methods": [ "getAzureNodePool" ] }, + "GetAzureOpenIdConfig": { + "methods": [ + "getAzureOpenIdConfig" + ] + }, "GetAzureServerConfig": { "methods": [ "getAzureServerConfig" diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json b/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json index 79c17065c97a..54292e4dc542 100644 --- a/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json @@ -48,6 +48,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "GenerateAttachedClusterAgentToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GenerateAttachedClusterInstallManifest": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php index ae4a8852eeec..a128879d6ff7 100644 --- a/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php @@ -80,6 +80,18 @@ ], ], ], + 'GenerateAttachedClusterAgentToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'attached_cluster', + 'fieldAccessors' => [ + 'getAttachedCluster', + ], + ], + ], + ], 'GenerateAttachedClusterInstallManifest' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse', diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php index 5d9c3003ee17..364619157fb7 100644 --- a/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php @@ -29,6 +29,18 @@ ], ], ], + 'GenerateAttachedClusterAgentToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken', + 'body' => '*', + 'placeholders' => [ + 'attached_cluster' => [ + 'getters' => [ + 'getAttachedCluster', + ], + ], + ], + ], 'GenerateAttachedClusterInstallManifest' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest', diff --git a/GkeMultiCloud/src/V1/resources/aws_clusters_client_config.json b/GkeMultiCloud/src/V1/resources/aws_clusters_client_config.json index c7c0634a0a98..25741e0c9cd6 100644 --- a/GkeMultiCloud/src/V1/resources/aws_clusters_client_config.json +++ b/GkeMultiCloud/src/V1/resources/aws_clusters_client_config.json @@ -63,16 +63,31 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GenerateAwsClusterAgentToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetAwsCluster": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetAwsJsonWebKeys": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetAwsNodePool": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetAwsOpenIdConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetAwsServerConfig": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -88,6 +103,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "RollbackAwsNodePoolUpdate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "UpdateAwsCluster": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", diff --git a/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php index 96093aa25a3c..03604870910b 100644 --- a/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php +++ b/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php @@ -79,6 +79,25 @@ ], ], ], + 'RollbackAwsNodePoolUpdate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'UpdateAwsCluster' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', @@ -131,6 +150,18 @@ ], ], ], + 'GenerateAwsClusterAgentToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], 'GetAwsCluster' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsCluster', @@ -143,6 +174,18 @@ ], ], ], + 'GetAwsJsonWebKeys' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], 'GetAwsNodePool' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsNodePool', @@ -155,6 +198,18 @@ ], ], ], + 'GetAwsOpenIdConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig', + 'headerParams' => [ + [ + 'keyName' => 'aws_cluster', + 'fieldAccessors' => [ + 'getAwsCluster', + ], + ], + ], + ], 'GetAwsServerConfig' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsServerConfig', diff --git a/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php index e61743f714aa..282fd1407fc1 100644 --- a/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php +++ b/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php @@ -66,6 +66,18 @@ ], ], ], + 'GenerateAwsClusterAgentToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken', + 'body' => '*', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], 'GetAwsCluster' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', @@ -77,6 +89,17 @@ ], ], ], + 'GetAwsJsonWebKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwks', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], 'GetAwsNodePool' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', @@ -88,6 +111,17 @@ ], ], ], + 'GetAwsOpenIdConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configuration', + 'placeholders' => [ + 'aws_cluster' => [ + 'getters' => [ + 'getAwsCluster', + ], + ], + ], + ], 'GetAwsServerConfig' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsServerConfig}', @@ -121,6 +155,18 @@ ], ], ], + 'RollbackAwsNodePoolUpdate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'UpdateAwsCluster' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}', diff --git a/GkeMultiCloud/src/V1/resources/azure_clusters_client_config.json b/GkeMultiCloud/src/V1/resources/azure_clusters_client_config.json index fae6b0761556..4b2a2924b13c 100644 --- a/GkeMultiCloud/src/V1/resources/azure_clusters_client_config.json +++ b/GkeMultiCloud/src/V1/resources/azure_clusters_client_config.json @@ -73,6 +73,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GenerateAzureClusterAgentToken": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetAzureClient": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -83,11 +88,21 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetAzureJsonWebKeys": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetAzureNodePool": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetAzureOpenIdConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetAzureServerConfig": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php index d2bb16b41b19..e50260fa88ca 100644 --- a/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php +++ b/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php @@ -169,6 +169,18 @@ ], ], ], + 'GenerateAzureClusterAgentToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], 'GetAzureClient' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureClient', @@ -193,6 +205,18 @@ ], ], ], + 'GetAzureJsonWebKeys' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], 'GetAzureNodePool' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureNodePool', @@ -205,6 +229,18 @@ ], ], ], + 'GetAzureOpenIdConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig', + 'headerParams' => [ + [ + 'keyName' => 'azure_cluster', + 'fieldAccessors' => [ + 'getAzureCluster', + ], + ], + ], + ], 'GetAzureServerConfig' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureServerConfig', diff --git a/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php index 76e3adfb1baf..69cbb41b0927 100644 --- a/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php +++ b/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php @@ -92,6 +92,18 @@ ], ], ], + 'GenerateAzureClusterAgentToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken', + 'body' => '*', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], 'GetAzureClient' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', @@ -114,6 +126,17 @@ ], ], ], + 'GetAzureJsonWebKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwks', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], 'GetAzureNodePool' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', @@ -125,6 +148,17 @@ ], ], ], + 'GetAzureOpenIdConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configuration', + 'placeholders' => [ + 'azure_cluster' => [ + 'getters' => [ + 'getAzureCluster', + ], + ], + ], + ], 'GetAzureServerConfig' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureServerConfig}', diff --git a/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php index 2de09dd4ce09..c40f10fc4218 100644 --- a/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php @@ -32,6 +32,7 @@ use Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig; use Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig; use Google\Cloud\GkeMultiCloud\V1\Fleet; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse; use Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersResponse; use Google\LongRunning\GetOperationRequest; @@ -350,6 +351,82 @@ public function deleteAttachedClusterExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function generateAttachedClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $response = $gapicClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + try { + $gapicClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function generateAttachedClusterInstallManifestTest() { diff --git a/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php index 0896a1d01b38..332408855849 100644 --- a/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php @@ -34,13 +34,16 @@ use Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption; use Google\Cloud\GkeMultiCloud\V1\AwsControlPlane; use Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption; +use Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig; use Google\Cloud\GkeMultiCloud\V1\AwsNodePool; use Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling; +use Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServerConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication; use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse; use Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint; @@ -159,8 +162,6 @@ public function createAwsClusterTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -267,8 +268,6 @@ public function createAwsClusterExceptionTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -772,6 +771,82 @@ public function generateAwsAccessTokenExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function generateAwsClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $response = $gapicClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + try { + $gapicClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAwsClusterTest() { @@ -846,6 +921,64 @@ public function getAwsClusterExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAwsJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AwsJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->getAwsJsonWebKeys($formattedAwsCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->getAwsJsonWebKeys($formattedAwsCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAwsNodePoolTest() { @@ -916,6 +1049,68 @@ public function getAwsNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAwsOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AwsOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $response = $gapicClient->getAwsOpenIdConfig($formattedAwsCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + try { + $gapicClient->getAwsOpenIdConfig($formattedAwsCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAwsServerConfigTest() { @@ -1112,6 +1307,135 @@ public function listAwsNodePoolsExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function rollbackAwsNodePoolUpdateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->rollbackAwsNodePoolUpdate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackAwsNodePoolUpdateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $response = $gapicClient->rollbackAwsNodePoolUpdate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function updateAwsClusterTest() { @@ -1190,8 +1514,6 @@ public function updateAwsClusterTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1295,8 +1617,6 @@ public function updateAwsClusterExceptionTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; diff --git a/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php index a2b72031c60c..dfe1627b3cff 100644 --- a/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php @@ -33,13 +33,16 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking; use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; use Google\Cloud\GkeMultiCloud\V1\AzureControlPlane; +use Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig; use Google\Cloud\GkeMultiCloud\V1\AzureNodePool; use Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling; +use Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AzureServerConfig; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse; use Google\Cloud\GkeMultiCloud\V1\ListAzureClustersResponse; use Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsResponse; @@ -298,8 +301,6 @@ public function createAzureClusterTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -396,8 +397,6 @@ public function createAzureClusterExceptionTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1016,6 +1015,82 @@ public function generateAzureAccessTokenExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function generateAzureClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $response = $gapicClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + try { + $gapicClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAzureClientTest() { @@ -1164,6 +1239,64 @@ public function getAzureClusterExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAzureJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AzureJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->getAzureJsonWebKeys($formattedAzureCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->getAzureJsonWebKeys($formattedAzureCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAzureNodePoolTest() { @@ -1236,6 +1369,68 @@ public function getAzureNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAzureOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AzureOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $response = $gapicClient->getAzureOpenIdConfig($formattedAzureCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + try { + $gapicClient->getAzureOpenIdConfig($formattedAzureCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAzureServerConfigTest() { @@ -1572,8 +1767,6 @@ public function updateAzureClusterTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1667,8 +1860,6 @@ public function updateAzureClusterExceptionTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; diff --git a/GkeMultiCloud/tests/Unit/V1/Client/AttachedClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/Client/AttachedClustersClientTest.php index fd2d633592c2..67d612dd5cc3 100644 --- a/GkeMultiCloud/tests/Unit/V1/Client/AttachedClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/Client/AttachedClustersClientTest.php @@ -34,6 +34,8 @@ use Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest; use Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest; use Google\Cloud\GkeMultiCloud\V1\Fleet; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse; use Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest; @@ -370,6 +372,92 @@ public function deleteAttachedClusterExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function generateAttachedClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAttachedClusterAgentTokenRequest()) + ->setAttachedCluster($formattedAttachedCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + $response = $gapicClient->generateAttachedClusterAgentToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAttachedClusterAgentTokenRequest()) + ->setAttachedCluster($formattedAttachedCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + try { + $gapicClient->generateAttachedClusterAgentToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function generateAttachedClusterInstallManifestTest() { diff --git a/GkeMultiCloud/tests/Unit/V1/Client/AwsClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/Client/AwsClustersClientTest.php index 1a0aed506d8f..6f139fc7e8f7 100644 --- a/GkeMultiCloud/tests/Unit/V1/Client/AwsClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/Client/AwsClustersClientTest.php @@ -33,9 +33,11 @@ use Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption; use Google\Cloud\GkeMultiCloud\V1\AwsControlPlane; use Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption; +use Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig; use Google\Cloud\GkeMultiCloud\V1\AwsNodePool; use Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling; +use Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServerConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication; use Google\Cloud\GkeMultiCloud\V1\Client\AwsClustersClient; @@ -46,14 +48,19 @@ use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAwsJsonWebKeysRequest; use Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAwsOpenIdConfigRequest; use Google\Cloud\GkeMultiCloud\V1\GetAwsServerConfigRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse; use Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint; +use Google\Cloud\GkeMultiCloud\V1\RollbackAwsNodePoolUpdateRequest; use Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest; use Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest; use Google\LongRunning\GetOperationRequest; @@ -171,8 +178,6 @@ public function createAwsClusterTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -283,8 +288,6 @@ public function createAwsClusterExceptionTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -812,6 +815,92 @@ public function generateAwsAccessTokenExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function generateAwsClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAwsClusterAgentTokenRequest()) + ->setAwsCluster($formattedAwsCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + $response = $gapicClient->generateAwsClusterAgentToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAwsClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAwsClusterAgentTokenRequest()) + ->setAwsCluster($formattedAwsCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + try { + $gapicClient->generateAwsClusterAgentToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAwsClusterTest() { @@ -890,6 +979,68 @@ public function getAwsClusterExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAwsJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AwsJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsJsonWebKeysRequest()) + ->setAwsCluster($formattedAwsCluster); + $response = $gapicClient->getAwsJsonWebKeys($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsJsonWebKeysRequest()) + ->setAwsCluster($formattedAwsCluster); + try { + $gapicClient->getAwsJsonWebKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAwsNodePoolTest() { @@ -964,6 +1115,72 @@ public function getAwsNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAwsOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AwsOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsOpenIdConfigRequest()) + ->setAwsCluster($formattedAwsCluster); + $response = $gapicClient->getAwsOpenIdConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAwsCluster(); + $this->assertProtobufEquals($formattedAwsCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAwsOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); + $request = (new GetAwsOpenIdConfigRequest()) + ->setAwsCluster($formattedAwsCluster); + try { + $gapicClient->getAwsOpenIdConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAwsServerConfigTest() { @@ -1172,6 +1389,139 @@ public function listAwsNodePoolsExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function rollbackAwsNodePoolUpdateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $subnetId = 'subnetId373593405'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new AwsNodePool(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $expectedResponse->setSubnetId($subnetId); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new RollbackAwsNodePoolUpdateRequest()) + ->setName($formattedName); + $response = $gapicClient->rollbackAwsNodePoolUpdate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackAwsNodePoolUpdateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); + $request = (new RollbackAwsNodePoolUpdateRequest()) + ->setName($formattedName); + $response = $gapicClient->rollbackAwsNodePoolUpdate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function updateAwsClusterTest() { @@ -1250,8 +1600,6 @@ public function updateAwsClusterTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1358,8 +1706,6 @@ public function updateAwsClusterExceptionTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1653,8 +1999,6 @@ public function createAwsClusterAsyncTest() $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); $awsCluster->setControlPlane($awsClusterControlPlane); $awsClusterAuthorization = new AwsAuthorization(); - $authorizationAdminUsers = []; - $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); $awsClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; diff --git a/GkeMultiCloud/tests/Unit/V1/Client/AzureClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/Client/AzureClustersClientTest.php index f87b121c8274..a16b92d02cae 100644 --- a/GkeMultiCloud/tests/Unit/V1/Client/AzureClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/Client/AzureClustersClientTest.php @@ -32,9 +32,11 @@ use Google\Cloud\GkeMultiCloud\V1\AzureCluster; use Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking; use Google\Cloud\GkeMultiCloud\V1\AzureControlPlane; +use Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys; use Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig; use Google\Cloud\GkeMultiCloud\V1\AzureNodePool; use Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling; +use Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig; use Google\Cloud\GkeMultiCloud\V1\AzureServerConfig; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; use Google\Cloud\GkeMultiCloud\V1\Client\AzureClustersClient; @@ -47,9 +49,13 @@ use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenRequest; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenRequest; +use Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse; use Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAzureJsonWebKeysRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest; +use Google\Cloud\GkeMultiCloud\V1\GetAzureOpenIdConfigRequest; use Google\Cloud\GkeMultiCloud\V1\GetAzureServerConfigRequest; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse; @@ -322,8 +328,6 @@ public function createAzureClusterTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -424,8 +428,6 @@ public function createAzureClusterExceptionTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1072,6 +1074,92 @@ public function generateAzureAccessTokenExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function generateAzureClusterAgentTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expiresIn = 833810928; + $tokenType = 'tokenType101507520'; + $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $expectedResponse->setExpiresIn($expiresIn); + $expectedResponse->setTokenType($tokenType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAzureClusterAgentTokenRequest()) + ->setAzureCluster($formattedAzureCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + $response = $gapicClient->generateAzureClusterAgentToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $actualValue = $actualRequestObject->getSubjectToken(); + $this->assertProtobufEquals($subjectToken, $actualValue); + $actualValue = $actualRequestObject->getSubjectTokenType(); + $this->assertProtobufEquals($subjectTokenType, $actualValue); + $actualValue = $actualRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAzureClusterAgentTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $subjectToken = 'subjectToken454811942'; + $subjectTokenType = 'subjectTokenType-697160013'; + $version = 'version351608024'; + $request = (new GenerateAzureClusterAgentTokenRequest()) + ->setAzureCluster($formattedAzureCluster) + ->setSubjectToken($subjectToken) + ->setSubjectTokenType($subjectTokenType) + ->setVersion($version); + try { + $gapicClient->generateAzureClusterAgentToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAzureClientTest() { @@ -1228,6 +1316,68 @@ public function getAzureClusterExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAzureJsonWebKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AzureJsonWebKeys(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureJsonWebKeysRequest()) + ->setAzureCluster($formattedAzureCluster); + $response = $gapicClient->getAzureJsonWebKeys($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureJsonWebKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureJsonWebKeysRequest()) + ->setAzureCluster($formattedAzureCluster); + try { + $gapicClient->getAzureJsonWebKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAzureNodePoolTest() { @@ -1304,6 +1454,72 @@ public function getAzureNodePoolExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAzureOpenIdConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $issuer = 'issuer-1179159879'; + $jwksUri = 'jwksUri1465527714'; + $expectedResponse = new AzureOpenIdConfig(); + $expectedResponse->setIssuer($issuer); + $expectedResponse->setJwksUri($jwksUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureOpenIdConfigRequest()) + ->setAzureCluster($formattedAzureCluster); + $response = $gapicClient->getAzureOpenIdConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getAzureCluster(); + $this->assertProtobufEquals($formattedAzureCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAzureOpenIdConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); + $request = (new GetAzureOpenIdConfigRequest()) + ->setAzureCluster($formattedAzureCluster); + try { + $gapicClient->getAzureOpenIdConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getAzureServerConfigTest() { @@ -1656,8 +1872,6 @@ public function updateAzureClusterTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; @@ -1754,8 +1968,6 @@ public function updateAzureClusterExceptionTest() $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); $azureCluster->setControlPlane($azureClusterControlPlane); $azureClusterAuthorization = new AzureAuthorization(); - $authorizationAdminUsers = []; - $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); $azureClusterFleet = new Fleet(); $fleetProject = 'fleetProject604893675'; diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php deleted file mode 100644 index 93800c00950918742b46d2b89b7b5ae293b3232f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3628 zcmbVP>rNX-6s~PdU`&YFCh3Ll_~si-YTT189J$bfO&1Z0&YPF#(fgBiAOlGT=EXK_{`{9Zh(R1qHQd6wJS!hy|*&natwscH5wPjV}M zS$-I~6?CL)EUOqz^Fol%49-G4?AAkiIve=NIw6#q z=3rL?lK+CnNxeGi@@lmwK!4pr-~2zdYD)@Nl)5gCsJwWxx_Bp|wR}>Fg|2kI`1r#fp}!zU(hXoUwb?O z8Sg7fVsTGk1ye@LqfAH~{n{WZ$SK2+Hk-J_>*+JFGNWuCqnyn!K-;2H`mBt4G4>so zv6u)tL4`idy$FS_hJrf7xa{dU5t#Nl(vHIpOd-s1kd$CftSKiyqMYS*T>FLK22IXN6mCZU@fLTD`3>n(-XOg`%fqf^z4R3k}&4KdXCKb^o*V+WG zcX;#uspJ(_?!SEAjJ(2Lt%TtoSBb!j=2ImV~aB)g8XCzcyxHN(vG zlT;x@S=p%CEwr$=U*4~@4|ew&mCf3At+JK>1X_2l(X1cV_G*32gI)QN z)^4C&v$9#=-K@P5s~H%bGkg2>Mnil}X|pI>X*TQ4d{!)MRjSSM7SK+czq~J>p_S3` zuf`@!{-6lMycB0I9?CDF0ngVI^_-+9TUwra-GS^V#La#M)OIW81U!t31){;uoP*%pHq|x>=Io$Rntndis$A23u)B>7KUKi2D=g$hJM-D|!QoN6^5c1+Sp@X+u$%rbL2+)u6CwD9-KaUklcV*)T?6X5h5;0#J=PK NA}!T3;T)YK^e>@ts)Yam diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php deleted file mode 100644 index 201ec24b7e06..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php +++ /dev/null @@ -1,113 +0,0 @@ -internalAddGeneratedFile( - ' -º( -4google/cloud/gkemulticloud/v1/attached_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/gkemulticloud/v1/attached_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"… --GenerateAttachedClusterInstallManifestRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster -attached_cluster_id ( BàA -platform_version ( BàAM - proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"B -.GenerateAttachedClusterInstallManifestResponse -manifest ( "ì -CreateAttachedClusterRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedClusterM -attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA -attached_cluster_id ( BàA - validate_only ("£ -ImportAttachedClusterRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster - validate_only ( -fleet_membership ( BàA -platform_version ( BàA - distribution ( BàAM - proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"º -UpdateAttachedClusterRequestM -attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"_ -GetAttachedClusterRequestB -name ( B4àAúA. -,gkemulticloud.googleapis.com/AttachedCluster"Š -ListAttachedClustersRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster - page_size ( - -page_token ( "‚ -ListAttachedClustersResponseI -attached_clusters ( 2..google.cloud.gkemulticloud.v1.AttachedCluster -next_page_token ( "µ -DeleteAttachedClusterRequestB -name ( B4àAúA. -,gkemulticloud.googleapis.com/AttachedCluster - validate_only ( - allow_missing ( - ignore_errors ( -etag ( "i -GetAttachedServerConfigRequestG -name ( B9àAúA3 -1gkemulticloud.googleapis.com/AttachedServerConfig"Ê -(GenerateAttachedClusterAgentTokenRequestN -attached_cluster ( B4àAúA. -,gkemulticloud.googleapis.com/AttachedCluster - subject_token ( BàA -subject_token_type ( BàA -version ( BàA - -grant_type ( BàA -audience ( BàA -scope ( BàA! -requested_token_type ( BàA -options - ( BàA"i -)GenerateAttachedClusterAgentTokenResponse - access_token (  - -expires_in ( - -token_type ( 2Ý -AttachedClusters™ -CreateAttachedCluster;.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.google.longrunning.Operation"£‚Óä“H"4/v1/{parent=projects/*/locations/*}/attachedClusters:attached_clusterÚA+parent,attached_cluster,attached_cluster_idÊA$ -AttachedClusterOperationMetadata› -UpdateAttachedCluster;.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.google.longrunning.Operation"¥‚Óä“Y2E/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}:attached_clusterÚAattached_cluster,update_maskÊA$ -AttachedClusterOperationMetadataý -ImportAttachedCluster;.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.google.longrunning.Operation"‡‚Óä“@";/v1/{parent=projects/*/locations/*}/attachedClusters:import:*ÚAparent,fleet_membershipÊA$ -AttachedClusterOperationMetadataà -GetAttachedCluster8.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest..google.cloud.gkemulticloud.v1.AttachedCluster"C‚Óä“64/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÖ -ListAttachedClusters:.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse"E‚Óä“64/v1/{parent=projects/*/locations/*}/attachedClustersÚAparentå -DeleteAttachedCluster;.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.google.longrunning.Operation"p‚Óä“6*4/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataÔ -GetAttachedServerConfig=.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest3.google.cloud.gkemulticloud.v1.AttachedServerConfig"E‚Óä“86/v1/{name=projects/*/locations/*/attachedServerConfig}ÚAname¶ -&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"o‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifestÚAparent,attached_cluster_id¥ -!GenerateAttachedClusterAgentTokenG.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequestH.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenResponse"m‚Óä“g"b/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken:*PÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBç -!com.google.cloud.gkemulticloud.v1BAttachedServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php deleted file mode 100644 index 4163515796ab81495e740bfb47708ca138d7decf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8270 zcmdT}&2rnw5e}(8t0~D6{71`c8w-2Oa;;5STqkkpby5^X%UoL`BT?GggcTGBjwq}^ z0EGc$YhAkKl*7J3uBjx~7D^dkdha)E0^#@0Mk7)J>6e_-Sg!y zyh9J}sGH1Tz7epF+CEW(L#BGZ8@Q%xtL^aMfcdKF_B_jGenC|?>gsmAsa7{?%}-I3 zyPx$7`#`Yp(lDj^zcR9l$YqjC+R3)Xm2F77L7y z5g4sap{P|MMXk-GqSpS}QvlO8I9JQB`A)14-hzrhFKpYEsq(LC3V(;x+2$DDxF#6Gd1u-mYiKxeHMhi^Hi*x6rA?| zwa&3y*|S>DEoOJt*`aZ4xqhiM*wsME`$S`-jxTloLA5Gwuje|kIzGO>zImG#x<_F2 zyzyn5Cmw5Upd+6zB2Mz*&#ma(%AHRCn4Y6|uk;N|X1)ji{28o$uv;rPrAR^eeqksQ z3dd{9*CUOFXRXE&Ap>Ih@efaiF^Co&4Ws4Tk(3B3bj#Hswp*n3YBV4~0}{*mQ$^Aq?X zSNx(N=XlSi3xjF4`=X>Rt6T$+*wCeECgW+c%2zONx=!G`w(i-6!}3#NrotFANwEe= z$w^+qyb%V6u5W#Z*nsm~6uMT^b(NE1QdtG2D12Fd29+!n$50YkxUfrNq+~+50vDLm z@mzGp{DpYa6Urh?gjOd%J9vZV;4?IYY1w3Mz%Li1ipP*MeTEu!I`DiBzvPO`@s?t5 zDD-=%b9A8J`wMe=mgyqKXz*SRvx^5b} z$^5`NuuM9~CEAo6^aQ33Y{r7TBIdiBGT(C=OOjco1`D>^?cy25OTHvjJV;UTN(v2D zno%k+&3xbWdH%An>^LqjcUC1axsy69Ay`_`F=d3|`^+to9CY4#3s_yL6cNVAU!$x&;r@Vn`r%Ud;vJI_!!-y_%55b%l5T92EK&O;3 z1ixiwz*pZ!|4vtJ7d?)GX7z3S_msF%gb?_ez%cUDQ|*s4aFH}708P0JGsn#5gkl1z zrTZgry&?YacEVCv6*?>C7?x6HlZMLg8HTar*j@iU{Fq zUsfL1OPEAB_HL152iW<)lFgf^)?*5RsvP>0s2HO;85jWn)3n!}UiP zJ_a?ZMV^U_L5k9zGs~aDY~RwUn6v}eDQ3HOLY&uFc2Iz`Y^JSKJ(3JSSt<`D>vZUe*M+nR#k6)(-_TkGcd8)C}M&Wf4*4E zYJbYW<-t)5*tT*BrjI=nu{mL9UN^I#`Ne;;}lu-p0&yB;6rG=M}htM@isv z?#PK4>a)rNxa~1tciaxsscP1FSNB63L8)VLqiwT}Fo9sO8SVR7$l+SIaWqxQBNa#@ z(NU2Rt)&dp5u2+T<1SCRe!0%estMo<{I+{DfRQtInMPa3sMtP|rg78XveT!qr=~DUzi^R1+jv>PSsMT=o2#KvK{TtqCp*gQQBuH35;zSp_31 zSrc3pU@}HT^>;kV0%b()z@?t?27Rf6-if>^@G-Rq`5R)1X#`=*c+)^ZJo`va9@j>n zU*8m~Oyk3eqfZd*8bHr*jIPWzx5ipfq-m=!CpY;LE=DyOXF-5I$@8kvmj>&5qLSN< zgoLvHCqn&w=3V)B8CXeU)Ul5!zln(S$5Uz|+p)TcZ96eoooc^^g<+FYS;s@a%aC0~ zCqtw=S4@MQT@o5P7_AEPLvIN-$hU?5WODihF4FtZF^&z(Ce##cUgiz$p-6MIhk+YW zS|mur-jHWlzEBon?0;rpK5{#Wfy$Xup=uJ3oWzfP$6MAu)@Ul=Mnl zYLb8qiY=JNy)#?Z8e@@U(jYfkcqK#=B)JwbZmLUi#h;|CWyoTqeEWU%Oal2a>svj< z21zfdH6zkjMj5WfWNq@{wb=P37vR>SX-4U~tO3&C1b00iU8gqC|D3MN!t|r*y5hmD zL|WH-EbuLpvW9JA6;AcC?D|#G&pwgi1xLlZ3DQ;RtCB8SfgJa+YQ@Af=uzEIQNN24 z(n%#=KZIPuS<~u_4=qZrMxIRkDzPhMl?zlu2<$W65K}6lfPk2+_=o_M_((t?KWcx^ z2nt{Km{aRSkg@>N7Uv<8$TN!#mh#n24ZB4iL=-gEoYU`qc`HH*F*R1`Lop9w5Ok$Z4S6Eugv3~XXNc*=m%`S3f z=0~O(?yA3l1zav}BWmHqRaY95!Bc$sgzw9~Pt7@Sm78#-zc1Yow`(EMn`T@x`DX9H5BT~}H0xypAsi<+q99aVppO^WGG8Z<&b@xEGtpg@50HQCC zU@`GUr=E3m2e1^M1$DX#SS2zUj}KtZXEvi|jTlXUoGZR(w00ln(5(F~mvSBEm{}C1 zWj~3^qC@*qI7b2-v1kQsdg0C7pbW))z7V~O8+4+U*H+;YP9*(d(7E`5QuZ&hhC9=i zP<{zB0ou?pWpi|_lJ$(1LQ|?Bn`N~ZFcUrFRm`Pkb-TP>`DUb_irv$V>htp6t0q>O z^Dv9;&{_rCt{aP4~(p?#c%vT6kIhE~`ovrIL^;m4=3tO8aZ=X^i^7{o-E#>hpoT ZflgdlW7`&+iRWBai;?n5`4mn8{tKexMD73p diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php deleted file mode 100644 index 1b138f920d2d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php +++ /dev/null @@ -1,156 +0,0 @@ -internalAddGeneratedFile( - ' -Ž9 -/google/cloud/gkemulticloud/v1/aws_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/gkemulticloud/v1/aws_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ó -CreateAwsClusterRequest? -parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsClusterC - aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA -aws_cluster_id ( BàA - validate_only ("« -UpdateAwsClusterRequestC - aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"U -GetAwsClusterRequest= -name ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"€ -ListAwsClustersRequest? -parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsCluster - page_size ( - -page_token ( "s -ListAwsClustersResponse? - aws_clusters ( 2).google.cloud.gkemulticloud.v1.AwsCluster -next_page_token ( "° -DeleteAwsClusterRequest= -name ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster - validate_only ( - allow_missing ( - ignore_errors (BàA -etag ( "Ú -CreateAwsNodePoolRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePoolF - aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA -aws_node_pool_id ( BàA - validate_only ("¯ -UpdateAwsNodePoolRequestF - aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"| - RollbackAwsNodePoolUpdateRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AwsNodePool - respect_pdb (BàA"W -GetAwsNodePoolRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AwsNodePool"‚ -ListAwsNodePoolsRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePool - page_size ( - -page_token ( "w -ListAwsNodePoolsResponseB -aws_node_pools ( 2*.google.cloud.gkemulticloud.v1.AwsNodePool -next_page_token ( "² -DeleteAwsNodePoolRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AwsNodePool - validate_only ( - allow_missing ( - ignore_errors (BàA -etag ( "a -GetAwsOpenIdConfigRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"` -GetAwsJsonWebKeysRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"_ -GetAwsServerConfigRequestB -name ( B4àAúA. -,gkemulticloud.googleapis.com/AwsServerConfig"e -GenerateAwsAccessTokenRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"u -GenerateAwsAccessTokenResponse - access_token ( BàA8 -expiration_time ( 2.google.protobuf.TimestampBàA"Ö -#GenerateAwsClusterAgentTokenRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster - subject_token ( BàA -subject_token_type ( BàA -version ( BàA - node_pool_id ( BàA - -grant_type ( BàA -audience ( BàA -scope ( BàA! -requested_token_type ( BàA -options - ( BàA"d -$GenerateAwsClusterAgentTokenResponse - access_token (  - -expires_in ( - -token_type ( 2© - AwsClustersö -CreateAwsCluster6.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.google.longrunning.Operation"Š‚Óä“>"//v1/{parent=projects/*/locations/*}/awsClusters: aws_clusterÚA!parent,aws_cluster,aws_cluster_idÊA - -AwsClusterOperationMetadataø -UpdateAwsCluster6.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.google.longrunning.Operation"Œ‚Óä“J2;/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}: aws_clusterÚAaws_cluster,update_maskÊA - -AwsClusterOperationMetadata¯ - GetAwsCluster3.google.cloud.gkemulticloud.v1.GetAwsClusterRequest).google.cloud.gkemulticloud.v1.AwsCluster">‚Óä“1//v1/{name=projects/*/locations/*/awsClusters/*}ÚAname -ListAwsClusters5.google.cloud.gkemulticloud.v1.ListAwsClustersRequest6.google.cloud.gkemulticloud.v1.ListAwsClustersResponse"@‚Óä“1//v1/{parent=projects/*/locations/*}/awsClustersÚAparentÖ -DeleteAwsCluster6.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.google.longrunning.Operation"k‚Óä“1*//v1/{name=projects/*/locations/*/awsClusters/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata‡ -GenerateAwsClusterAgentTokenB.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequestC.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenResponse"^‚Óä“X"S/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken:*ì -GenerateAwsAccessToken<.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest=.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse"U‚Óä“OM/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessTokenŽ -CreateAwsNodePool7.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.google.longrunning.Operation" ‚Óä“O">/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools: aws_node_poolÚA%parent,aws_node_pool,aws_node_pool_idÊA - AwsNodePoolOperationMetadata -UpdateAwsNodePool7.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.google.longrunning.Operation"¢‚Óä“]2L/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}: aws_node_poolÚAaws_node_pool,update_maskÊA - AwsNodePoolOperationMetadataù -RollbackAwsNodePoolUpdate?.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest.google.longrunning.Operation"|‚Óä“L"G/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback:*ÚAnameÊA - AwsNodePoolOperationMetadataÁ -GetAwsNodePool4.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest*.google.cloud.gkemulticloud.v1.AwsNodePool"M‚Óä“@>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ÚAnameÔ -ListAwsNodePools6.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest7.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"O‚Óä“@>/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePoolsÚAparentç -DeleteAwsNodePool7.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.google.longrunning.Operation"z‚Óä“@*>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataß -GetAwsOpenIdConfig8.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest..google.cloud.gkemulticloud.v1.AwsOpenIdConfig"_‚Óä“YW/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configurationÀ -GetAwsJsonWebKeys7.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest-.google.cloud.gkemulticloud.v1.AwsJsonWebKeys"C‚Óä“=;/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwksÀ -GetAwsServerConfig8.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest..google.cloud.gkemulticloud.v1.AwsServerConfig"@‚Óä“31/v1/{name=projects/*/locations/*/awsServerConfig}ÚAnamePÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBâ -!com.google.cloud.gkemulticloud.v1BAwsServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php deleted file mode 100644 index 5666e4e33faa7ac2f5a4f2c3cb5f5dd5fe15e9c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8085 zcmc&(Pg5J&5sxIm(83sowLQl1dUnzNCRHagtTlPETo}6>a!5<wf+Eb^rR;{l5N% zd*s5W$~Lo^rw6Q~v`>}bh$*h;1dicYN;~X!nWq>|-!(1fRTO1&PubmTDz(je^Ai;H zozOE_Rp~iS&tfZv<%FG;-ZATkR$z)>C#x&^+t6d0$HZ#C!u12#dY}2OZZKuL@pOj; zdPfiR);3qw+8|Y}?X0TS;p$@m!_s|UStphIu}1h76#VCgZOb$iKhSY=<&NoVrfmkM zZkccKa8H!3ZutyVoL}1wZ6h!pTOolx+hEK06rq#W-fz&u;G zTAR!_Jkt#vuYpUe)gB8HuhL(Z??u~^Iv$bV1tMil{=_jV+RjcW#QYG&bjh&ibYV=jLHk^Lnv14_9etn61nAeDHHKy0`UCC%L9AjPT{evE=5v@W)5+)dz&ObV~?Tcm`Ak z@}Y9Fx^yGbsk`P%oE0J|mL7ipc9@Ci)8SNFx*bXJ#KOQ_31ZJhYOh5L0(8#`rWq4| zSN}c>vpkhHtkB0;mS$ms(o!xch2P=Af9ujWyI5UHSTQVrs&YA{J?!{ke-Z*DD@xluS& z4oHyHl%%UL&FqfrVD8A%sEG$cNt%aJi1#~_{sn`^W9W9nwCENAzf21i520*$3^i&L zpK=+$l-HKx^TokiNzy)%3SEj>AvK#%3IiD{N>9E_hDnD|)@|FN!r<7xJg1a!=da_P zN2lpPWL4Hv@ft?dsqk&91u})J<>(y@b8>xfs^Q_gW>1#5rQ_oFRU}@Iq&K**IQpk> z%@B#H8Ms;miF)CjOq4fL(sRmQb^Bm8YWqxD%5?6SvMuNhk zJv^s_g&i|DHR=X8YGsU3JBeJzuBA1YAC3p945eds8Ug2Jm^{&~kO|1F79SPV5GHvx zVInOYG}oIo?d9%4qqb4ss@FE>e}IWJ+t}YbtRK|(cI&&_^99s+Y5(Oe|522#KzYBm zvA4TXe?ebMh}6>u&Amp0eoaU-Fj?E*-`k&`qz{|5?fvylR6A7-->rLaZ?FUjK*j3g zSFoV0Wbaa{VH$qJjKE*{Hu~S$iscAI!oS7;JrkrZ!U_B!pe%~kGxfUyT+8ZBky*M8 z(uwH>p>Amr*i(Vv1xJMC9k}i~9Zm0au#WheVRk&NjT;~P=+2S|`=YcAHzVL2xw4e5 zybrhIl{`<|I$}B|ljetQw19S}x*#f>`iCi45SC{OfbXJv|G3He zSPKQJ7f4rMH|<#01?uB@UB8A!V(@LmE_k|>L1d|lZbOAGu zA(`OW%hjkAxXv}44)u0oeh61w)*m1vL@WpCV1lP5X^8X*&U{hQCop83)Q8mN zs`qZ)f#o~}lDZXXBdUsd>mvze$|LiKwP;Q|l(eb{}r?T@FTe8I<^G+-4I0eB7q_q~442 zJ=%>dr>voqrwu5Nf3JfamyqLCi&Si^;rGSG+gGE?m8VtbC;nE%T)2y6lnvd zL`9HA$5qLbBea7+4w0k-=$F7lQTi3$X&5-Zfm5iYr~PT(9q0@gBeA&HYAbH&D3|8e z)-Iwf+tEd>Tc(+NKbQ<ahbBCziFT#MnEJduI77c9W_CMVj>ZY+nQTE#dEdfaY$$S zn&$wbeN!^Z(V;{J!vR{dWcUd^~8!PLsM9gl!I|8QkW- zqoyZTntZkq3owox>r7pN#RPy-4^x#U6u>sy)lH8>7O&C;^)HifC6N$-!kdk#eMsPx zQ}rzECjiTd=vitaV*hzWSE)-XuRY3}O~SrmvWnEm?Bf(cqv>Kg8yaqSh$WQQKCIyx zr2j;6#`9qA)eM~!Cm%`wML+RB(Elee6%cy(IPM~kE|2jjg;0|Ogi(7ig~XUyKF-8Q zJXilfI-(1C!G&wdT}GYZCX|0c*uzz)?X2}?fl7oHG?6Cx^60CVo#q|;1;2WWP|1Yhs~J~KO7;2bj>d-k49Ln7VkX?%i{T|UW| z%P@~`P-Z{-Wr}}UgmTX#{!WP?dchfWGa@?Ae8+yp+RxdkFMSCU*hRz)PaP91&t4y^ z|Bl^59E^F9dj_ZV&tMKs#-l`&ikS7~A_&hP`G;b_QMbE}a9ZR?O^@F1XwvTsuU74M z>&Gzkv@vR~G+^(~E`-8aQT4Bd2w8^=y)rbIA@IZ|s%`Q6kD8$Z0Wh||n$y)RvnysM z0)X)@<}+V38Z<}G1Pk%K&~;X@t>lyNf^;8dJ!UZ)bMV!orFqY4^#RQBbV-Idlm}Q0 z_&WklUa6f-P`;?1#$Bo4y2)%+`VriS$7R_0Vgg_j%?a?p^sFR3f-j8hn}?R|9nVW9 zJh-IZ8Kl{qXyDxO5fhq; zt?0d(9-Pw^Eqrl)S5$s{>1_)x*{H6oz%+e04W@J-ja-aWike^a5iVBi?)Y MO7SXt24?{O1-Gpj*8l(j diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php deleted file mode 100644 index f64c0fcbe2b9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php +++ /dev/null @@ -1,173 +0,0 @@ -internalAddGeneratedFile( - ' -¡D -1google/cloud/gkemulticloud/v1/azure_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/gkemulticloud/v1/azure_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ý -CreateAzureClusterRequestA -parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureClusterG - azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA -azure_cluster_id ( BàA - validate_only ("± -UpdateAzureClusterRequestG - azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"Y -GetAzureClusterRequest? -name ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"„ -ListAzureClustersRequestA -parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureCluster - page_size ( - -page_token ( "y -ListAzureClustersResponseC -azure_clusters ( 2+.google.cloud.gkemulticloud.v1.AzureCluster -next_page_token ( "˜ -DeleteAzureClusterRequest? -name ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster - allow_missing ( - validate_only ( -etag ( "ä -CreateAzureNodePoolRequestB -parent ( B2àAúA,*gkemulticloud.googleapis.com/AzureNodePoolJ -azure_node_pool ( 2,.google.cloud.gkemulticloud.v1.AzureNodePoolBàA -azure_node_pool_id ( BàA - validate_only ("µ -UpdateAzureNodePoolRequestJ -azure_node_pool ( 2,.google.cloud.gkemulticloud.v1.AzureNodePoolBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"[ -GetAzureNodePoolRequest@ -name ( B2àAúA, -*gkemulticloud.googleapis.com/AzureNodePool"† -ListAzureNodePoolsRequestB -parent ( B2àAúA,*gkemulticloud.googleapis.com/AzureNodePool - page_size ( - -page_token ( "} -ListAzureNodePoolsResponseF -azure_node_pools ( 2,.google.cloud.gkemulticloud.v1.AzureNodePool -next_page_token ( "š -DeleteAzureNodePoolRequest@ -name ( B2àAúA, -*gkemulticloud.googleapis.com/AzureNodePool - validate_only ( - allow_missing ( -etag ( "g -GetAzureOpenIdConfigRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"f -GetAzureJsonWebKeysRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"c -GetAzureServerConfigRequestD -name ( B6àAúA0 -.gkemulticloud.googleapis.com/AzureServerConfig"Ø -CreateAzureClientRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AzureClientE - azure_client ( 2*.google.cloud.gkemulticloud.v1.AzureClientBàA -azure_client_id ( BàA - validate_only ("W -GetAzureClientRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AzureClient"‚ -ListAzureClientsRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AzureClient - page_size ( - -page_token ( "v -ListAzureClientsResponseA - azure_clients ( 2*.google.cloud.gkemulticloud.v1.AzureClient -next_page_token ( "ˆ -DeleteAzureClientRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AzureClient - allow_missing ( - validate_only ("k -GenerateAzureAccessTokenRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"w - GenerateAzureAccessTokenResponse - access_token ( BàA8 -expiration_time ( 2.google.protobuf.TimestampBàA"Ü -%GenerateAzureClusterAgentTokenRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster - subject_token ( BàA -subject_token_type ( BàA -version ( BàA - node_pool_id ( BàA - -grant_type ( BàA -audience ( BàA -scope ( BàA! -requested_token_type ( BàA -options - ( BàA"f -&GenerateAzureClusterAgentTokenResponse - access_token (  - -expires_in ( - -token_type ( 2Ì# - AzureClustersý -CreateAzureClient7.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.google.longrunning.Operation"‚Óä“@"0/v1/{parent=projects/*/locations/*}/azureClients: azure_clientÚA#parent,azure_client,azure_client_idÊA - AzureClientOperationMetadata³ -GetAzureClient4.google.cloud.gkemulticloud.v1.GetAzureClientRequest*.google.cloud.gkemulticloud.v1.AzureClient"?‚Óä“20/v1/{name=projects/*/locations/*/azureClients/*}ÚAnameÆ -ListAzureClients6.google.cloud.gkemulticloud.v1.ListAzureClientsRequest7.google.cloud.gkemulticloud.v1.ListAzureClientsResponse"A‚Óä“20/v1/{parent=projects/*/locations/*}/azureClientsÚAparentÙ -DeleteAzureClient7.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.google.longrunning.Operation"l‚Óä“2*0/v1/{name=projects/*/locations/*/azureClients/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata„ -CreateAzureCluster8.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.google.longrunning.Operation"”‚Óä“B"1/v1/{parent=projects/*/locations/*}/azureClusters: azure_clusterÚA%parent,azure_cluster,azure_cluster_idÊA! - AzureClusterOperationMetadata† -UpdateAzureCluster8.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.google.longrunning.Operation"–‚Óä“P2?/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}: azure_clusterÚAazure_cluster,update_maskÊA! - AzureClusterOperationMetadata· -GetAzureCluster5.google.cloud.gkemulticloud.v1.GetAzureClusterRequest+.google.cloud.gkemulticloud.v1.AzureCluster"@‚Óä“31/v1/{name=projects/*/locations/*/azureClusters/*}ÚAnameÊ -ListAzureClusters7.google.cloud.gkemulticloud.v1.ListAzureClustersRequest8.google.cloud.gkemulticloud.v1.ListAzureClustersResponse"B‚Óä“31/v1/{parent=projects/*/locations/*}/azureClustersÚAparentÜ -DeleteAzureCluster8.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/azureClusters/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata“ -GenerateAzureClusterAgentTokenD.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequestE.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenResponse"d‚Óä“^"Y/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken:*ø -GenerateAzureAccessToken>.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest?.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse"[‚Óä“US/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessTokenž -CreateAzureNodePool9.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.google.longrunning.Operation"¬‚Óä“U"B/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools:azure_node_poolÚA)parent,azure_node_pool,azure_node_pool_idÊA" - AzureNodePoolOperationMetadata  -UpdateAzureNodePool9.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.google.longrunning.Operation"®‚Óä“e2R/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}:azure_node_poolÚAazure_node_pool,update_maskÊA" - AzureNodePoolOperationMetadataË -GetAzureNodePool6.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest,.google.cloud.gkemulticloud.v1.AzureNodePool"Q‚Óä“DB/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ÚAnameÞ -ListAzureNodePools8.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest9.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse"S‚Óä“DB/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePoolsÚAparentï -DeleteAzureNodePool9.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.google.longrunning.Operation"~‚Óä“D*B/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataù -GetAzureOpenIdConfig:.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest0.google.cloud.gkemulticloud.v1.AzureOpenIdConfig"s‚Óä“][/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configurationÚA azure_clusterÚ -GetAzureJsonWebKeys9.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest/.google.cloud.gkemulticloud.v1.AzureJsonWebKeys"W‚Óä“A?/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwksÚA azure_clusterÈ -GetAzureServerConfig:.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest0.google.cloud.gkemulticloud.v1.AzureServerConfig"B‚Óä“53/v1/{name=projects/*/locations/*/azureServerConfig}ÚAnamePÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBä -!com.google.cloud.gkemulticloud.v1BAzureServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php deleted file mode 100644 index 9162c8f2951509859a2ceaf20a01cc1b8662003b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2515 zcmbVO-Ez}L6s~Q^&j|^(fZ))fEQT3Er*$TQa$!mt|H!VXZFyoRG>oUJENz@^WUacA z457nJpQI1a$LM7*d)3R{b*4|zBdw(T5K0GM>Fl2K?K$81)_cBu>K?dohqS0eh2c|+ zjE{(aK#423&rNQVaj?Hn1u^;5Wi}OMLK+(BX+xqm+QZuz>hVCBv_dAFPi(qj+B~o} zCWmwy*gliiY;yzSr`*v6mF`|SIsm{irqpu{laf}y)}_8-8NM-UMOdSHh&5`R#2W2x zJ_ayt!}CZz!rV?E;U^&YbAz$XOycV6M+aA6+Yz3H4K6! z@v$Ks+b8QX$4cd`B%csp1oY(Tgb3;f!g(C!9Rj>bzeeX!S9RH_$*67B=z%d~TvRH@ zRULzz7n&9}WY`S(ZIK_*}CoRq;pRbDZ$>&jVA^Jo}Q_PBsp;7t{R-bcmXmi7ATh#HHe^lqrKAR{C z0Q00P-SsmYfxZuu#VNu&=4}q(gP@TjaPkcc?j$I!oV&lpFm-1 zyg~%a(_K8k;TDZf$klRxRkNj^vry1*11|=5lDnonge6l@y!(1cT;#vBb)y`Up0HX@ z#SmiUlucNmjwM4v7XL@c6`1o4ftNzoAaQQMa(D{@Pq*;$Gg}fb_txMN6@rUoD{6$? zD!_#q6=T^2xpW6s1^qEV#ZpT*4ZOa#9aS22Z6R_h{gHvi9?~+52+N}+Xe^0vKa1VD zI5X^k$_~i22Fy|X4>V=oD_a{0H|GnooZ^?&C@exL?ZKQhl~qvGW>c*X^_||Juh!em zw%W*lq+Eujo~94#U#pFsj+)Pej{R-5sc!2h*R#qB04}KCs`Z_rn$MLU!NsOcsjpmx zdFPsu{JfxhyU~3LB;B3q}NyvU%aR0 z6eo_BfTiCuuzLQM@&XFfF~&BM=mxmtpa_w*5^( znJD3yGI<{!y{C$=KcLgpoBR@9b-(w`Z)Qe%!Gj;euwfC;{i6p!Ry zrlF1_OP?nH11nqA_at==SXoVxx(HOFuyT4uxdk7qyVcH4b=cN=dRJ?xXOw*j78>nA zwbntMXOz1@`rF#G@B$3ly;esZVpL!2wCj7i+G}dtbv2)@{hfi^sEq&4w{{i#jB`ag z10b6|?`K}L;=38m5oN^LnD8@0iQzJwOHMr}?)dQ;``7Hvmc)o=kuuIA-Egjv*6!x- z$^IxFR>EoJ*kgp_%0F2mAu5$9s!}=SQmO22j^|KBK7Vj8eKJ3j1Hg%S;hnQWgoogle.cloud.gkemulticloud.v1.AttachedCluster - */ -class AttachedCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. OpenID Connect (OIDC) configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $oidc_config = null; - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $platform_version = ''; - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distribution = ''; - /** - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * - * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_region = ''; - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this cluster was registered. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 11; - */ - protected $etag = ''; - /** - * Output only. The Kubernetes version of the cluster. - * - * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_version = ''; - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_config = null; - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authorization = null; - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type string $description - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig $oidc_config - * Required. OpenID Connect (OIDC) configuration for the cluster. - * @type string $platform_version - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @type string $distribution - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * @type string $cluster_region - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Required. Fleet configuration. - * @type int $state - * Output only. The current state of the cluster. - * @type string $uid - * Output only. A globally unique identifier for the cluster. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this cluster was registered. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this cluster was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type string $kubernetes_version - * Output only. The Kubernetes version of the cluster. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config - * Output only. Workload Identity settings. - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config - * Optional. Logging configuration for this cluster. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization $authorization - * Optional. Configuration related to the cluster RBAC settings. - * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config - * Optional. Monitoring configuration for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization - * Optional. Binary Authorization configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. OpenID Connect (OIDC) configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig|null - */ - public function getOidcConfig() - { - return $this->oidc_config; - } - - public function hasOidcConfig() - { - return isset($this->oidc_config); - } - - public function clearOidcConfig() - { - unset($this->oidc_config); - } - - /** - * Required. OpenID Connect (OIDC) configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig $var - * @return $this - */ - public function setOidcConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig::class); - $this->oidc_config = $var; - - return $this; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlatformVersion() - { - return $this->platform_version; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlatformVersion($var) - { - GPBUtil::checkString($var, True); - $this->platform_version = $var; - - return $this; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkString($var, True); - $this->distribution = $var; - - return $this; - } - - /** - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * - * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterRegion() - { - return $this->cluster_region; - } - - /** - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * - * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterRegion($var) - { - GPBUtil::checkString($var, True); - $this->cluster_region = $var; - - return $this; - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was registered. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this cluster was registered. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 11; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 11; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The Kubernetes version of the cluster. - * - * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKubernetesVersion() - { - return $this->kubernetes_version; - } - - /** - * Output only. The Kubernetes version of the cluster. - * - * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKubernetesVersion($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_version = $var; - - return $this; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null - */ - public function getWorkloadIdentityConfig() - { - return $this->workload_identity_config; - } - - public function hasWorkloadIdentityConfig() - { - return isset($this->workload_identity_config); - } - - public function clearWorkloadIdentityConfig() - { - unset($this->workload_identity_config); - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var - * @return $this - */ - public function setWorkloadIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); - $this->workload_identity_config = $var; - - return $this; - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Optional. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php deleted file mode 100644 index 51a928e34a8a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedCluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being registered. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been register and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that some work is actively being done on - * the cluster, such as upgrading software components. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the cluster is being de-registered. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the cluster is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the cluster requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php deleted file mode 100644 index 7e2ea588596e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClusterError - */ -class AttachedClusterError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php deleted file mode 100644 index f020f59ff48b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClusterUser - */ -class AttachedClusterUser extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php deleted file mode 100644 index ee4306f352a8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClustersAuthorization - */ -class AttachedClustersAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_users; - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminUsers() - { - return $this->admin_users; - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminUsers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser::class); - $this->admin_users = $arr; - - return $this; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminGroups() - { - return $this->admin_groups; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup::class); - $this->admin_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php deleted file mode 100644 index 116db53533d8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedOidcConfig - */ -class AttachedOidcConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * - * Generated from protobuf field string issuer_url = 1; - */ - protected $issuer_url = ''; - /** - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * - * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $jwks = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer_url - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * @type string $jwks - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * - * Generated from protobuf field string issuer_url = 1; - * @return string - */ - public function getIssuerUrl() - { - return $this->issuer_url; - } - - /** - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * - * Generated from protobuf field string issuer_url = 1; - * @param string $var - * @return $this - */ - public function setIssuerUrl($var) - { - GPBUtil::checkString($var, True); - $this->issuer_url = $var; - - return $this; - } - - /** - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * - * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getJwks() - { - return $this->jwks; - } - - /** - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * - * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setJwks($var) - { - GPBUtil::checkString($var, False); - $this->jwks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php deleted file mode 100644 index a81ade67a335..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo - */ -class AttachedPlatformVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Platform version name. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Platform version name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Platform version name. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Platform version name. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php deleted file mode 100644 index 3257fd12cab9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedServerConfig - */ -class AttachedServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * List of valid platform versions. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; - */ - private $valid_versions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the config. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of valid platform versions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * List of valid platform versions. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidVersions() - { - return $this->valid_versions; - } - - /** - * List of valid platform versions. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo::class); - $this->valid_versions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php deleted file mode 100644 index 25f25a6866ee..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsAuthorization - */ -class AwsAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_users; - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminUsers() - { - return $this->admin_users; - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminUsers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterUser::class); - $this->admin_users = $arr; - - return $this; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminGroups() - { - return $this->admin_groups; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup::class); - $this->admin_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php deleted file mode 100644 index dddb1fd5dc97..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection - */ -class AwsAutoscalingGroupMetricsCollection extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * - * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $granularity = ''; - /** - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * - * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $granularity - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * @type array|\Google\Protobuf\Internal\RepeatedField $metrics - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * - * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGranularity() - { - return $this->granularity; - } - - /** - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * - * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGranularity($var) - { - GPBUtil::checkString($var, True); - $this->granularity = $var; - - return $this; - } - - /** - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * - * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * - * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php deleted file mode 100644 index 68baa291c95b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php +++ /dev/null @@ -1,923 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsCluster - */ -class AwsCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $networking = null; - /** - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * - * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_region = ''; - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $control_plane = null; - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint = ''; - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - */ - protected $etag = ''; - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_config = null; - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_ca_certificate = ''; - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type string $description - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking $networking - * Required. Cluster-wide networking configuration. - * @type string $aws_region - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane $control_plane - * Required. Configuration related to the cluster control plane. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization $authorization - * Required. Configuration related to the cluster RBAC settings. - * @type int $state - * Output only. The current state of the cluster. - * @type string $endpoint - * Output only. The endpoint of the cluster's API server. - * @type string $uid - * Output only. A globally unique identifier for the cluster. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this cluster was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this cluster was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config - * Output only. Workload Identity settings. - * @type string $cluster_ca_certificate - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Required. Fleet configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config - * Optional. Logging configuration for this cluster. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config - * Optional. Monitoring configuration for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization - * Optional. Binary Authorization configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking|null - */ - public function getNetworking() - { - return $this->networking; - } - - public function hasNetworking() - { - return isset($this->networking); - } - - public function clearNetworking() - { - unset($this->networking); - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking $var - * @return $this - */ - public function setNetworking($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking::class); - $this->networking = $var; - - return $this; - } - - /** - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * - * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAwsRegion() - { - return $this->aws_region; - } - - /** - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * - * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAwsRegion($var) - { - GPBUtil::checkString($var, True); - $this->aws_region = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane|null - */ - public function getControlPlane() - { - return $this->control_plane; - } - - public function hasControlPlane() - { - return isset($this->control_plane); - } - - public function clearControlPlane() - { - unset($this->control_plane); - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane $var - * @return $this - */ - public function setControlPlane($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane::class); - $this->control_plane = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null - */ - public function getWorkloadIdentityConfig() - { - return $this->workload_identity_config; - } - - public function hasWorkloadIdentityConfig() - { - return isset($this->workload_identity_config); - } - - public function clearWorkloadIdentityConfig() - { - unset($this->workload_identity_config); - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var - * @return $this - */ - public function setWorkloadIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); - $this->workload_identity_config = $var; - - return $this; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterCaCertificate() - { - return $this->cluster_ca_certificate; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->cluster_ca_certificate = $var; - - return $this; - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php deleted file mode 100644 index 59e416b25a7b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsCluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that some work is actively being done on - * the cluster, such as upgrading the control plane replicas. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the cluster is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the cluster is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the cluster requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AwsCluster_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php deleted file mode 100644 index f40a291a78f8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterError - */ -class AwsClusterError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php deleted file mode 100644 index 9301c3f5e52d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterNetworking - */ -class AwsClusterNetworking extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * - * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vpc_id = ''; - /** - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $pod_address_cidr_blocks; - /** - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $service_address_cidr_blocks; - /** - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * - * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $per_node_pool_sg_rules_disabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vpc_id - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $pod_address_cidr_blocks - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_address_cidr_blocks - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * @type bool $per_node_pool_sg_rules_disabled - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * - * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVpcId() - { - return $this->vpc_id; - } - - /** - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * - * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVpcId($var) - { - GPBUtil::checkString($var, True); - $this->vpc_id = $var; - - return $this; - } - - /** - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPodAddressCidrBlocks() - { - return $this->pod_address_cidr_blocks; - } - - /** - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPodAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->pod_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAddressCidrBlocks() - { - return $this->service_address_cidr_blocks; - } - - /** - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * - * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPerNodePoolSgRulesDisabled() - { - return $this->per_node_pool_sg_rules_disabled; - } - - /** - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * - * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPerNodePoolSgRulesDisabled($var) - { - GPBUtil::checkBool($var); - $this->per_node_pool_sg_rules_disabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php deleted file mode 100644 index 005bd094c801..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterUser - */ -class AwsClusterUser extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php deleted file mode 100644 index ed4be8aef12a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsConfigEncryption - */ -class AwsConfigEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARN of the AWS KMS key used to encrypt user data. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_arn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_arn - * Required. The ARN of the AWS KMS key used to encrypt user data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt user data. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyArn() - { - return $this->kms_key_arn; - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt user data. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyArn($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_arn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php deleted file mode 100644 index 826ee8af1a67..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php +++ /dev/null @@ -1,693 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsControlPlane - */ -class AwsControlPlane extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * - * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_type = ''; - /** - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ssh_config = null; - /** - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * - * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $subnet_ids; - /** - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $security_group_ids; - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * - * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $iam_instance_profile = ''; - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $main_volume = null; - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_encryption = null; - /** - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Required. Authentication configuration for management of AWS resources. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_services_authentication = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_encryption = null; - /** - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_placement = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @type string $instance_type - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * @type array|\Google\Protobuf\Internal\RepeatedField $subnet_ids - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * @type array|\Google\Protobuf\Internal\RepeatedField $security_group_ids - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * @type string $iam_instance_profile - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $main_volume - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption $database_encryption - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication $aws_services_authentication - * Required. Authentication configuration for management of AWS resources. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $config_encryption - * Required. Config encryption for user data. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $instance_placement - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * - * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * - * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * - * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubnetIds() - { - return $this->subnet_ids; - } - - /** - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * - * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubnetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subnet_ids = $arr; - - return $this; - } - - /** - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityGroupIds() - { - return $this->security_group_ids; - } - - /** - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityGroupIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->security_group_ids = $arr; - - return $this; - } - - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * - * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIamInstanceProfile() - { - return $this->iam_instance_profile; - } - - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * - * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIamInstanceProfile($var) - { - GPBUtil::checkString($var, True); - $this->iam_instance_profile = $var; - - return $this; - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null - */ - public function getMainVolume() - { - return $this->main_volume; - } - - public function hasMainVolume() - { - return isset($this->main_volume); - } - - public function clearMainVolume() - { - unset($this->main_volume); - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var - * @return $this - */ - public function setMainVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); - $this->main_volume = $var; - - return $this; - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption|null - */ - public function getDatabaseEncryption() - { - return $this->database_encryption; - } - - public function hasDatabaseEncryption() - { - return isset($this->database_encryption); - } - - public function clearDatabaseEncryption() - { - unset($this->database_encryption); - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption $var - * @return $this - */ - public function setDatabaseEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption::class); - $this->database_encryption = $var; - - return $this; - } - - /** - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Required. Authentication configuration for management of AWS resources. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication|null - */ - public function getAwsServicesAuthentication() - { - return $this->aws_services_authentication; - } - - public function hasAwsServicesAuthentication() - { - return isset($this->aws_services_authentication); - } - - public function clearAwsServicesAuthentication() - { - unset($this->aws_services_authentication); - } - - /** - * Required. Authentication configuration for management of AWS resources. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication $var - * @return $this - */ - public function setAwsServicesAuthentication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication::class); - $this->aws_services_authentication = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement|null - */ - public function getInstancePlacement() - { - return $this->instance_placement; - } - - public function hasInstancePlacement() - { - return isset($this->instance_placement); - } - - public function clearInstancePlacement() - { - unset($this->instance_placement); - } - - /** - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $var - * @return $this - */ - public function setInstancePlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement::class); - $this->instance_placement = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php deleted file mode 100644 index e7e0ce60bd12..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsDatabaseEncryption - */ -class AwsDatabaseEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_arn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_arn - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyArn() - { - return $this->kms_key_arn; - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyArn($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_arn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php deleted file mode 100644 index e2eccd85ae67..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsInstancePlacement - */ -class AwsInstancePlacement extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The tenancy for instance. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenancy = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tenancy - * Required. The tenancy for instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The tenancy for instance. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTenancy() - { - return $this->tenancy; - } - - /** - * Required. The tenancy for instance. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTenancy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement\Tenancy::class); - $this->tenancy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php deleted file mode 100644 index 7c147a1fef41..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy - */ -class Tenancy -{ - /** - * Not set. - * - * Generated from protobuf enum TENANCY_UNSPECIFIED = 0; - */ - const TENANCY_UNSPECIFIED = 0; - /** - * Use default VPC tenancy. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * Run a dedicated instance. - * - * Generated from protobuf enum DEDICATED = 2; - */ - const DEDICATED = 2; - /** - * Launch this instance to a dedicated host. - * - * Generated from protobuf enum HOST = 3; - */ - const HOST = 3; - - private static $valueToName = [ - self::TENANCY_UNSPECIFIED => 'TENANCY_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::DEDICATED => 'DEDICATED', - self::HOST => 'HOST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tenancy::class, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement_Tenancy::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php deleted file mode 100644 index 9e560d4e09ec..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsK8sVersionInfo - */ -class AwsK8sVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes version name. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life = false; - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life_date = null; - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $release_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Kubernetes version name. - * @type bool $enabled - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * @type bool $end_of_life - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * @type \Google\Type\Date $end_of_life_date - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * @type \Google\Type\Date $release_date - * Optional. The date (in Pacific Time) when the cluster version was released. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes version name. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Kubernetes version name. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEndOfLife() - { - return $this->end_of_life; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEndOfLife($var) - { - GPBUtil::checkBool($var); - $this->end_of_life = $var; - - return $this; - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getEndOfLifeDate() - { - return $this->end_of_life_date; - } - - public function hasEndOfLifeDate() - { - return isset($this->end_of_life_date); - } - - public function clearEndOfLifeDate() - { - unset($this->end_of_life_date); - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setEndOfLifeDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->end_of_life_date = $var; - - return $this; - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getReleaseDate() - { - return $this->release_date; - } - - public function hasReleaseDate() - { - return isset($this->release_date); - } - - public function clearReleaseDate() - { - unset($this->release_date); - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setReleaseDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->release_date = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php deleted file mode 100644 index 7109191a83c5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php +++ /dev/null @@ -1,663 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodeConfig - */ -class AwsNodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * - * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_type = ''; - /** - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $taints; - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Required. The name or ARN of the AWS IAM role assigned to nodes in the - * pool. - * - * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $iam_instance_profile = ''; - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_type = ''; - /** - * Optional. The SSH configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ssh_config = null; - /** - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $security_group_ids; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_encryption = null; - /** - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_placement = null; - /** - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscaling_metrics_collection = null; - /** - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spot_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_type - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * @type array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $taints - * Optional. The initial taints assigned to nodes of this node pool. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * @type string $iam_instance_profile - * Required. The name or ARN of the AWS IAM role assigned to nodes in the - * pool. - * @type string $image_type - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config - * Optional. The SSH configuration. - * @type array|\Google\Protobuf\Internal\RepeatedField $security_group_ids - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $config_encryption - * Required. Config encryption for user data. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $instance_placement - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection $autoscaling_metrics_collection - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * @type \Google\Cloud\GkeMultiCloud\V1\SpotConfig $spot_config - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * - * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * - * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaints() - { - return $this->taints; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\NodeTaint::class); - $this->taints = $arr; - - return $this; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Required. The name or ARN of the AWS IAM role assigned to nodes in the - * pool. - * - * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIamInstanceProfile() - { - return $this->iam_instance_profile; - } - - /** - * Required. The name or ARN of the AWS IAM role assigned to nodes in the - * pool. - * - * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIamInstanceProfile($var) - { - GPBUtil::checkString($var, True); - $this->iam_instance_profile = $var; - - return $this; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageType() - { - return $this->image_type; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageType($var) - { - GPBUtil::checkString($var, True); - $this->image_type = $var; - - return $this; - } - - /** - * Optional. The SSH configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Optional. The SSH configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityGroupIds() - { - return $this->security_group_ids; - } - - /** - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityGroupIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->security_group_ids = $arr; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement|null - */ - public function getInstancePlacement() - { - return $this->instance_placement; - } - - public function hasInstancePlacement() - { - return isset($this->instance_placement); - } - - public function clearInstancePlacement() - { - unset($this->instance_placement); - } - - /** - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $var - * @return $this - */ - public function setInstancePlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement::class); - $this->instance_placement = $var; - - return $this; - } - - /** - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection|null - */ - public function getAutoscalingMetricsCollection() - { - return $this->autoscaling_metrics_collection; - } - - public function hasAutoscalingMetricsCollection() - { - return isset($this->autoscaling_metrics_collection); - } - - public function clearAutoscalingMetricsCollection() - { - unset($this->autoscaling_metrics_collection); - } - - /** - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection $var - * @return $this - */ - public function setAutoscalingMetricsCollection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection::class); - $this->autoscaling_metrics_collection = $var; - - return $this; - } - - /** - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\SpotConfig|null - */ - public function getSpotConfig() - { - return $this->spot_config; - } - - public function hasSpotConfig() - { - return isset($this->spot_config); - } - - public function clearSpotConfig() - { - unset($this->spot_config); - } - - /** - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\SpotConfig $var - * @return $this - */ - public function setSpotConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SpotConfig::class); - $this->spot_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php deleted file mode 100644 index e7187eca223d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php +++ /dev/null @@ -1,727 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePool - */ -class AwsNodePool extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Required. The configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config = null; - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling = null; - /** - * Required. The subnet where the node pool node run. - * - * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet_id = ''; - /** - * Output only. The lifecycle state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the node - * pool. - * - * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 21; - */ - protected $etag = ''; - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_pods_constraint = null; - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $management = null; - /** - * Optional. Update settings control the speed and disruption of the update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * @type string $version - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $config - * Required. The configuration of the node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $autoscaling - * Required. Autoscaler configuration for this node pool. - * @type string $subnet_id - * Required. The subnet where the node pool node run. - * @type int $state - * Output only. The lifecycle state of the node pool. - * @type string $uid - * Output only. A globally unique identifier for the node pool. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the node - * pool. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this node pool was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this node pool was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $management - * Optional. The Management configuration for this node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $update_settings - * Optional. Update settings control the speed and disruption of the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Required. The configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Required. The configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling|null - */ - public function getAutoscaling() - { - return $this->autoscaling; - } - - public function hasAutoscaling() - { - return isset($this->autoscaling); - } - - public function clearAutoscaling() - { - unset($this->autoscaling); - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $var - * @return $this - */ - public function setAutoscaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling::class); - $this->autoscaling = $var; - - return $this; - } - - /** - * Required. The subnet where the node pool node run. - * - * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Required. The subnet where the node pool node run. - * - * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Output only. The lifecycle state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The lifecycle state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the node - * pool. - * - * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the node - * pool. - * - * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 21; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 21; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null - */ - public function getMaxPodsConstraint() - { - return $this->max_pods_constraint; - } - - public function hasMaxPodsConstraint() - { - return isset($this->max_pods_constraint); - } - - public function clearMaxPodsConstraint() - { - unset($this->max_pods_constraint); - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var - * @return $this - */ - public function setMaxPodsConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class); - $this->max_pods_constraint = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement|null - */ - public function getManagement() - { - return $this->management; - } - - public function hasManagement() - { - return isset($this->management); - } - - public function clearManagement() - { - unset($this->management); - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement::class); - $this->management = $var; - - return $this; - } - - /** - * Optional. Update settings control the speed and disruption of the update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateSettings|null - */ - public function getUpdateSettings() - { - return $this->update_settings; - } - - public function hasUpdateSettings() - { - return isset($this->update_settings); - } - - public function clearUpdateSettings() - { - unset($this->update_settings); - } - - /** - * Optional. Update settings control the speed and disruption of the update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $var - * @return $this - */ - public function setUpdateSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\UpdateSettings::class); - $this->update_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php deleted file mode 100644 index 6c57e22b0028..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePool.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the node pool is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the node pool has been created - * and is fully usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that the node pool is being reconciled. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the node pool is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the node pool is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the node pool requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php deleted file mode 100644 index fa2cda6ccf53..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling - */ -class AwsNodePoolAutoscaling extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_node_count = 0; - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_node_count - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @type int $max_node_count - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMinNodeCount() - { - return $this->min_node_count; - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMinNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_node_count = $var; - - return $this; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php deleted file mode 100644 index c5a04b7d3934..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePoolError - */ -class AwsNodePoolError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php deleted file mode 100644 index 2e5856c7b329..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsProxyConfig - */ -class AwsProxyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * - * Generated from protobuf field string secret_arn = 1; - */ - protected $secret_arn = ''; - /** - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * - * Generated from protobuf field string secret_version = 2; - */ - protected $secret_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret_arn - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * @type string $secret_version - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * - * Generated from protobuf field string secret_arn = 1; - * @return string - */ - public function getSecretArn() - { - return $this->secret_arn; - } - - /** - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * - * Generated from protobuf field string secret_arn = 1; - * @param string $var - * @return $this - */ - public function setSecretArn($var) - { - GPBUtil::checkString($var, True); - $this->secret_arn = $var; - - return $this; - } - - /** - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * - * Generated from protobuf field string secret_version = 2; - * @return string - */ - public function getSecretVersion() - { - return $this->secret_version; - } - - /** - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * - * Generated from protobuf field string secret_version = 2; - * @param string $var - * @return $this - */ - public function setSecretVersion($var) - { - GPBUtil::checkString($var, True); - $this->secret_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php deleted file mode 100644 index 04d329be8dfa..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsServerConfig - */ -class AwsServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; - */ - private $valid_versions; - /** - * The list of supported AWS regions. - * - * Generated from protobuf field repeated string supported_aws_regions = 3; - */ - private $supported_aws_regions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the config. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_aws_regions - * The list of supported AWS regions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidVersions() - { - return $this->valid_versions; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo::class); - $this->valid_versions = $arr; - - return $this; - } - - /** - * The list of supported AWS regions. - * - * Generated from protobuf field repeated string supported_aws_regions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedAwsRegions() - { - return $this->supported_aws_regions; - } - - /** - * The list of supported AWS regions. - * - * Generated from protobuf field repeated string supported_aws_regions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedAwsRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_aws_regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php deleted file mode 100644 index cef249ad091f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsServicesAuthentication - */ -class AwsServicesAuthentication extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * - * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $role_arn = ''; - /** - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * - * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $role_session_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $role_arn - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * @type string $role_session_name - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * - * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRoleArn() - { - return $this->role_arn; - } - - /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * - * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRoleArn($var) - { - GPBUtil::checkString($var, True); - $this->role_arn = $var; - - return $this; - } - - /** - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * - * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRoleSessionName() - { - return $this->role_session_name; - } - - /** - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * - * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRoleSessionName($var) - { - GPBUtil::checkString($var, True); - $this->role_session_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php deleted file mode 100644 index a3e356328b16..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsSshConfig - */ -class AwsSshConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the EC2 key pair used to login into cluster machines. - * - * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ec2_key_pair = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ec2_key_pair - * Required. The name of the EC2 key pair used to login into cluster machines. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the EC2 key pair used to login into cluster machines. - * - * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEc2KeyPair() - { - return $this->ec2_key_pair; - } - - /** - * Required. The name of the EC2 key pair used to login into cluster machines. - * - * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEc2KeyPair($var) - { - GPBUtil::checkString($var, True); - $this->ec2_key_pair = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php deleted file mode 100644 index 4a6ca5810edc..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsVolumeTemplate - */ -class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $size_gib = 0; - /** - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $volume_type = 0; - /** - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * - * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $iops = 0; - /** - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * - * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $throughput = 0; - /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * - * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_arn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $size_gib - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * @type int $volume_type - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * @type int $iops - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * @type int $throughput - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * @type string $kms_key_arn - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSizeGib() - { - return $this->size_gib; - } - - /** - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSizeGib($var) - { - GPBUtil::checkInt32($var); - $this->size_gib = $var; - - return $this; - } - - /** - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVolumeType() - { - return $this->volume_type; - } - - /** - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVolumeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate\VolumeType::class); - $this->volume_type = $var; - - return $this; - } - - /** - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * - * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIops() - { - return $this->iops; - } - - /** - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * - * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIops($var) - { - GPBUtil::checkInt32($var); - $this->iops = $var; - - return $this; - } - - /** - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * - * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getThroughput() - { - return $this->throughput; - } - - /** - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * - * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setThroughput($var) - { - GPBUtil::checkInt32($var); - $this->throughput = $var; - - return $this; - } - - /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * - * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyArn() - { - return $this->kms_key_arn; - } - - /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * - * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyArn($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_arn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php deleted file mode 100644 index 8a88654de373..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType - */ -class VolumeType -{ - /** - * Not set. - * - * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; - */ - const VOLUME_TYPE_UNSPECIFIED = 0; - /** - * GP2 (General Purpose SSD volume type). - * - * Generated from protobuf enum GP2 = 1; - */ - const GP2 = 1; - /** - * GP3 (General Purpose SSD volume type). - * - * Generated from protobuf enum GP3 = 2; - */ - const GP3 = 2; - - private static $valueToName = [ - self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', - self::GP2 => 'GP2', - self::GP3 => 'GP3', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VolumeType::class, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate_VolumeType::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php deleted file mode 100644 index 25a4862f0652..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureAuthorization - */ -class AzureAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_users; - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminUsers() - { - return $this->admin_users; - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminUsers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterUser::class); - $this->admin_users = $arr; - - return $this; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminGroups() - { - return $this->admin_groups; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup::class); - $this->admin_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php deleted file mode 100644 index 002830ccfddd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php +++ /dev/null @@ -1,411 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClient - */ -class AzureClient extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenant_id = ''; - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application_id = ''; - /** - * Output only. If set, there are currently pending changes to the client. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. The PEM encoded x509 certificate. - * - * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pem_certificate = ''; - /** - * Output only. A globally unique identifier for the client. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time at which this resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this client was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type string $tenant_id - * Required. The Azure Active Directory Tenant ID. - * @type string $application_id - * Required. The Azure Active Directory Application ID. - * @type bool $reconciling - * Output only. If set, there are currently pending changes to the client. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type string $pem_certificate - * Output only. The PEM encoded x509 certificate. - * @type string $uid - * Output only. A globally unique identifier for the client. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this client was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTenantId() - { - return $this->tenant_id; - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTenantId($var) - { - GPBUtil::checkString($var, True); - $this->tenant_id = $var; - - return $this; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getApplicationId() - { - return $this->application_id; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setApplicationId($var) - { - GPBUtil::checkString($var, True); - $this->application_id = $var; - - return $this; - } - - /** - * Output only. If set, there are currently pending changes to the client. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently pending changes to the client. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The PEM encoded x509 certificate. - * - * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPemCertificate() - { - return $this->pem_certificate; - } - - /** - * Output only. The PEM encoded x509 certificate. - * - * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPemCertificate($var) - { - GPBUtil::checkString($var, True); - $this->pem_certificate = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the client. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the client. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time at which this resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this client was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this client was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php deleted file mode 100644 index fb3117ed00b6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php +++ /dev/null @@ -1,1087 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureCluster - */ -class AzureCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * - * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_region = ''; - /** - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * - * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_group_id = ''; - /** - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $azure_client = ''; - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $networking = null; - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $control_plane = null; - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization = null; - /** - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $azure_services_authentication = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint = ''; - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - */ - protected $etag = ''; - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_config = null; - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_ca_certificate = ''; - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Output only. Managed Azure resources for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $managed_resources = null; - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type string $description - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * @type string $azure_region - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * @type string $resource_group_id - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * @type string $azure_client - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking $networking - * Required. Cluster-wide networking configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane $control_plane - * Required. Configuration related to the cluster control plane. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization $authorization - * Required. Configuration related to the cluster RBAC settings. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $azure_services_authentication - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * @type int $state - * Output only. The current state of the cluster. - * @type string $endpoint - * Output only. The endpoint of the cluster's API server. - * @type string $uid - * Output only. A globally unique identifier for the cluster. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this cluster was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this cluster was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config - * Output only. Workload Identity settings. - * @type string $cluster_ca_certificate - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Required. Fleet configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $managed_resources - * Output only. Managed Azure resources for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config - * Optional. Logging configuration for this cluster. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config - * Optional. Monitoring configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * - * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureRegion() - { - return $this->azure_region; - } - - /** - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * - * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureRegion($var) - { - GPBUtil::checkString($var, True); - $this->azure_region = $var; - - return $this; - } - - /** - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * - * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getResourceGroupId() - { - return $this->resource_group_id; - } - - /** - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * - * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setResourceGroupId($var) - { - GPBUtil::checkString($var, True); - $this->resource_group_id = $var; - - return $this; - } - - /** - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAzureClient() - { - return $this->azure_client; - } - - /** - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAzureClient($var) - { - GPBUtil::checkString($var, True); - $this->azure_client = $var; - - return $this; - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking|null - */ - public function getNetworking() - { - return $this->networking; - } - - public function hasNetworking() - { - return isset($this->networking); - } - - public function clearNetworking() - { - unset($this->networking); - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking $var - * @return $this - */ - public function setNetworking($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking::class); - $this->networking = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane|null - */ - public function getControlPlane() - { - return $this->control_plane; - } - - public function hasControlPlane() - { - return isset($this->control_plane); - } - - public function clearControlPlane() - { - unset($this->control_plane); - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane $var - * @return $this - */ - public function setControlPlane($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane::class); - $this->control_plane = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication|null - */ - public function getAzureServicesAuthentication() - { - return $this->azure_services_authentication; - } - - public function hasAzureServicesAuthentication() - { - return isset($this->azure_services_authentication); - } - - public function clearAzureServicesAuthentication() - { - unset($this->azure_services_authentication); - } - - /** - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $var - * @return $this - */ - public function setAzureServicesAuthentication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication::class); - $this->azure_services_authentication = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null - */ - public function getWorkloadIdentityConfig() - { - return $this->workload_identity_config; - } - - public function hasWorkloadIdentityConfig() - { - return isset($this->workload_identity_config); - } - - public function clearWorkloadIdentityConfig() - { - unset($this->workload_identity_config); - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var - * @return $this - */ - public function setWorkloadIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); - $this->workload_identity_config = $var; - - return $this; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterCaCertificate() - { - return $this->cluster_ca_certificate; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->cluster_ca_certificate = $var; - - return $this; - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Output only. Managed Azure resources for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources|null - */ - public function getManagedResources() - { - return $this->managed_resources; - } - - public function hasManagedResources() - { - return isset($this->managed_resources); - } - - public function clearManagedResources() - { - unset($this->managed_resources); - } - - /** - * Output only. Managed Azure resources for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $var - * @return $this - */ - public function setManagedResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources::class); - $this->managed_resources = $var; - - return $this; - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php deleted file mode 100644 index e62a7b58f248..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureCluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that some work is actively being done on - * the cluster, such as upgrading the control plane replicas. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the cluster is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the cluster is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the cluster requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AzureCluster_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php deleted file mode 100644 index cf9a9b6b2e5d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterError - */ -class AzureClusterError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php deleted file mode 100644 index c4425dee6e7c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterNetworking - */ -class AzureClusterNetworking extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * - * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $virtual_network_id = ''; - /** - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $pod_address_cidr_blocks; - /** - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $service_address_cidr_blocks; - /** - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * - * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_load_balancer_subnet_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $virtual_network_id - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $pod_address_cidr_blocks - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_address_cidr_blocks - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * @type string $service_load_balancer_subnet_id - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * - * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVirtualNetworkId() - { - return $this->virtual_network_id; - } - - /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * - * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVirtualNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->virtual_network_id = $var; - - return $this; - } - - /** - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPodAddressCidrBlocks() - { - return $this->pod_address_cidr_blocks; - } - - /** - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPodAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->pod_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAddressCidrBlocks() - { - return $this->service_address_cidr_blocks; - } - - /** - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * - * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceLoadBalancerSubnetId() - { - return $this->service_load_balancer_subnet_id; - } - - /** - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * - * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceLoadBalancerSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->service_load_balancer_subnet_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php deleted file mode 100644 index ca301cadedac..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterResources - */ -class AzureClusterResources extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The ARM ID of the cluster network security group. - * - * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $network_security_group_id = ''; - /** - * Output only. The ARM ID of the control plane application security group. - * - * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $control_plane_application_security_group_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_security_group_id - * Output only. The ARM ID of the cluster network security group. - * @type string $control_plane_application_security_group_id - * Output only. The ARM ID of the control plane application security group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The ARM ID of the cluster network security group. - * - * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNetworkSecurityGroupId() - { - return $this->network_security_group_id; - } - - /** - * Output only. The ARM ID of the cluster network security group. - * - * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNetworkSecurityGroupId($var) - { - GPBUtil::checkString($var, True); - $this->network_security_group_id = $var; - - return $this; - } - - /** - * Output only. The ARM ID of the control plane application security group. - * - * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getControlPlaneApplicationSecurityGroupId() - { - return $this->control_plane_application_security_group_id; - } - - /** - * Output only. The ARM ID of the control plane application security group. - * - * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setControlPlaneApplicationSecurityGroupId($var) - { - GPBUtil::checkString($var, True); - $this->control_plane_application_security_group_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php deleted file mode 100644 index 3aecd59fbf61..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterUser - */ -class AzureClusterUser extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php deleted file mode 100644 index f90fcdd501a4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureConfigEncryption - */ -class AzureConfigEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_id = ''; - /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * - * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $public_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * @type string $public_key - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * - * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPublicKey() - { - return $this->public_key; - } - - /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * - * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->public_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php deleted file mode 100644 index 92f3fed0095f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php +++ /dev/null @@ -1,613 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureControlPlane - */ -class AzureControlPlane extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * - * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet_id = ''; - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vm_size = ''; - /** - * Required. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_config = null; - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $main_volume = null; - /** - * Optional. Configuration related to application-layer secrets encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $database_encryption = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config_encryption = null; - /** - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * - * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $replica_placements; - /** - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * - * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $endpoint_subnet_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * @type string $subnet_id - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * @type string $vm_size - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config - * Required. SSH configuration for how to access the underlying control plane - * machines. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $root_volume - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $main_volume - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption $database_encryption - * Optional. Configuration related to application-layer secrets encryption. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $config_encryption - * Optional. Configuration related to vm config encryption. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * @type array<\Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement>|\Google\Protobuf\Internal\RepeatedField $replica_placements - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * @type string $endpoint_subnet_id - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * - * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * - * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVmSize() - { - return $this->vm_size; - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVmSize($var) - { - GPBUtil::checkString($var, True); - $this->vm_size = $var; - - return $this; - } - - /** - * Required. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Required. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null - */ - public function getMainVolume() - { - return $this->main_volume; - } - - public function hasMainVolume() - { - return isset($this->main_volume); - } - - public function clearMainVolume() - { - unset($this->main_volume); - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var - * @return $this - */ - public function setMainVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); - $this->main_volume = $var; - - return $this; - } - - /** - * Optional. Configuration related to application-layer secrets encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption|null - */ - public function getDatabaseEncryption() - { - return $this->database_encryption; - } - - public function hasDatabaseEncryption() - { - return isset($this->database_encryption); - } - - public function clearDatabaseEncryption() - { - unset($this->database_encryption); - } - - /** - * Optional. Configuration related to application-layer secrets encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption $var - * @return $this - */ - public function setDatabaseEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption::class); - $this->database_encryption = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * - * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * - * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplicaPlacements() - { - return $this->replica_placements; - } - - /** - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplicaPlacements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement::class); - $this->replica_placements = $arr; - - return $this; - } - - /** - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * - * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEndpointSubnetId() - { - return $this->endpoint_subnet_id; - } - - /** - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * - * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEndpointSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_subnet_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php deleted file mode 100644 index 21c7b8009267..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureDatabaseEncryption - */ -class AzureDatabaseEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * - * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * - * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * - * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php deleted file mode 100644 index f3c1a39446b7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureDiskTemplate - */ -class AzureDiskTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $size_gib = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $size_gib - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSizeGib() - { - return $this->size_gib; - } - - /** - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSizeGib($var) - { - GPBUtil::checkInt32($var); - $this->size_gib = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php deleted file mode 100644 index c454dce8f80f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureK8sVersionInfo - */ -class AzureK8sVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life = false; - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life_date = null; - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $release_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * @type bool $enabled - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * @type bool $end_of_life - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * @type \Google\Type\Date $end_of_life_date - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * @type \Google\Type\Date $release_date - * Optional. The date (in Pacific Time) when the cluster version was released. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEndOfLife() - { - return $this->end_of_life; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEndOfLife($var) - { - GPBUtil::checkBool($var); - $this->end_of_life = $var; - - return $this; - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getEndOfLifeDate() - { - return $this->end_of_life_date; - } - - public function hasEndOfLifeDate() - { - return isset($this->end_of_life_date); - } - - public function clearEndOfLifeDate() - { - unset($this->end_of_life_date); - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setEndOfLifeDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->end_of_life_date = $var; - - return $this; - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getReleaseDate() - { - return $this->release_date; - } - - public function hasReleaseDate() - { - return isset($this->release_date); - } - - public function clearReleaseDate() - { - unset($this->release_date); - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setReleaseDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->release_date = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php deleted file mode 100644 index 8167a17060ad..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodeConfig - */ -class AzureNodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vm_size = ''; - /** - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_type = ''; - /** - * Required. SSH configuration for how to access the node pool machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_config = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config_encryption = null; - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $taints; - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_size - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $root_volume - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * @type string $image_type - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config - * Required. SSH configuration for how to access the node pool machines. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $config_encryption - * Optional. Configuration related to vm config encryption. - * @type array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $taints - * Optional. The initial taints assigned to nodes of this node pool. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVmSize() - { - return $this->vm_size; - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVmSize($var) - { - GPBUtil::checkString($var, True); - $this->vm_size = $var; - - return $this; - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageType() - { - return $this->image_type; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageType($var) - { - GPBUtil::checkString($var, True); - $this->image_type = $var; - - return $this; - } - - /** - * Required. SSH configuration for how to access the node pool machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Required. SSH configuration for how to access the node pool machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaints() - { - return $this->taints; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\NodeTaint::class); - $this->taints = $arr; - - return $this; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php deleted file mode 100644 index d2fd28ceca6e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php +++ /dev/null @@ -1,713 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePool - */ -class AzureNodePool extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Required. The node configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config = null; - /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * - * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet_id = ''; - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling = null; - /** - * Output only. The current state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently pending changes to the node - * pool. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 12; - */ - protected $etag = ''; - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_pods_constraint = null; - /** - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * - * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $azure_availability_zone = ''; - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $management = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * @type string $version - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig $config - * Required. The node configuration of the node pool. - * @type string $subnet_id - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling $autoscaling - * Required. Autoscaler configuration for this node pool. - * @type int $state - * Output only. The current state of the node pool. - * @type string $uid - * Output only. A globally unique identifier for the node pool. - * @type bool $reconciling - * Output only. If set, there are currently pending changes to the node - * pool. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this node pool was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this node pool was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * @type string $azure_availability_zone - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $management - * Optional. The Management configuration for this node pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Required. The node configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Required. The node configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * - * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * - * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling|null - */ - public function getAutoscaling() - { - return $this->autoscaling; - } - - public function hasAutoscaling() - { - return isset($this->autoscaling); - } - - public function clearAutoscaling() - { - unset($this->autoscaling); - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling $var - * @return $this - */ - public function setAutoscaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling::class); - $this->autoscaling = $var; - - return $this; - } - - /** - * Output only. The current state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently pending changes to the node - * pool. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently pending changes to the node - * pool. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 12; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 12; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null - */ - public function getMaxPodsConstraint() - { - return $this->max_pods_constraint; - } - - public function hasMaxPodsConstraint() - { - return isset($this->max_pods_constraint); - } - - public function clearMaxPodsConstraint() - { - unset($this->max_pods_constraint); - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var - * @return $this - */ - public function setMaxPodsConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class); - $this->max_pods_constraint = $var; - - return $this; - } - - /** - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * - * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAzureAvailabilityZone() - { - return $this->azure_availability_zone; - } - - /** - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * - * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAzureAvailabilityZone($var) - { - GPBUtil::checkString($var, True); - $this->azure_availability_zone = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement|null - */ - public function getManagement() - { - return $this->management; - } - - public function hasManagement() - { - return isset($this->management); - } - - public function clearManagement() - { - unset($this->management); - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement::class); - $this->management = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php deleted file mode 100644 index 1d994d640f61..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePool.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the node pool is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the node pool has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that the node pool is being reconciled. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the node pool is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the node pool is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the node pool requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php deleted file mode 100644 index 2688e11da544..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling - */ -class AzureNodePoolAutoscaling extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_node_count = 0; - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_node_count - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @type int $max_node_count - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMinNodeCount() - { - return $this->min_node_count; - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMinNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_node_count = $var; - - return $this; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php deleted file mode 100644 index 854ce75b671a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePoolError - */ -class AzureNodePoolError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php deleted file mode 100644 index 15d6eae15612..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureProxyConfig - */ -class AzureProxyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * - * Generated from protobuf field string resource_group_id = 1; - */ - protected $resource_group_id = ''; - /** - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * - * Generated from protobuf field string secret_id = 2; - */ - protected $secret_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_group_id - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * @type string $secret_id - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * - * Generated from protobuf field string resource_group_id = 1; - * @return string - */ - public function getResourceGroupId() - { - return $this->resource_group_id; - } - - /** - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * - * Generated from protobuf field string resource_group_id = 1; - * @param string $var - * @return $this - */ - public function setResourceGroupId($var) - { - GPBUtil::checkString($var, True); - $this->resource_group_id = $var; - - return $this; - } - - /** - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * - * Generated from protobuf field string secret_id = 2; - * @return string - */ - public function getSecretId() - { - return $this->secret_id; - } - - /** - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * - * Generated from protobuf field string secret_id = 2; - * @param string $var - * @return $this - */ - public function setSecretId($var) - { - GPBUtil::checkString($var, True); - $this->secret_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php deleted file mode 100644 index b16a42166e59..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureServerConfig - */ -class AzureServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; - */ - private $valid_versions; - /** - * The list of supported Azure regions. - * - * Generated from protobuf field repeated string supported_azure_regions = 3; - */ - private $supported_azure_regions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_azure_regions - * The list of supported Azure regions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidVersions() - { - return $this->valid_versions; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo::class); - $this->valid_versions = $arr; - - return $this; - } - - /** - * The list of supported Azure regions. - * - * Generated from protobuf field repeated string supported_azure_regions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedAzureRegions() - { - return $this->supported_azure_regions; - } - - /** - * The list of supported Azure regions. - * - * Generated from protobuf field repeated string supported_azure_regions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedAzureRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_azure_regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php deleted file mode 100644 index b5a17552ed8f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureServicesAuthentication - */ -class AzureServicesAuthentication extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenant_id = ''; - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tenant_id - * Required. The Azure Active Directory Tenant ID. - * @type string $application_id - * Required. The Azure Active Directory Application ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTenantId() - { - return $this->tenant_id; - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTenantId($var) - { - GPBUtil::checkString($var, True); - $this->tenant_id = $var; - - return $this; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getApplicationId() - { - return $this->application_id; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setApplicationId($var) - { - GPBUtil::checkString($var, True); - $this->application_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php deleted file mode 100644 index 1327e9f14c97..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureSshConfig - */ -class AzureSshConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * - * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorized_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $authorized_key - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * - * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAuthorizedKey() - { - return $this->authorized_key; - } - - /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * - * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAuthorizedKey($var) - { - GPBUtil::checkString($var, True); - $this->authorized_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php deleted file mode 100644 index 80fed129c9ca..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest - */ -class CreateAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster_id = ''; - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster, string $attachedClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attached_cluster - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * @type string $attached_cluster_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster|null - */ - public function getAttachedCluster() - { - return $this->attached_cluster; - } - - public function hasAttachedCluster() - { - return isset($this->attached_cluster); - } - - public function clearAttachedCluster() - { - unset($this->attached_cluster); - } - - /** - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $var - * @return $this - */ - public function setAttachedCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); - $this->attached_cluster = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttachedClusterId() - { - return $this->attached_cluster_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttachedClusterId($var) - { - GPBUtil::checkString($var, True); - $this->attached_cluster_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php deleted file mode 100644 index 2421c4f73fba..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAwsClusterRequest - */ -class CreateAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_cluster = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_cluster_id = ''; - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAwsClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster, string $awsClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsCluster $aws_cluster - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * @type string $aws_cluster_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - public function hasAwsCluster() - { - return isset($this->aws_cluster); - } - - public function clearAwsCluster() - { - unset($this->aws_cluster); - } - - /** - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); - $this->aws_cluster = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAwsClusterId() - { - return $this->aws_cluster_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAwsClusterId($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php deleted file mode 100644 index 0a50ccd7b646..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest - */ -class CreateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_node_pool = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_node_pool_id = ''; - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAwsNodePoolRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool, string $awsNodePoolId): self - { - return (new self()) - ->setParent($parent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $aws_node_pool - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * @type string $aws_node_pool_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the node - * pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool|null - */ - public function getAwsNodePool() - { - return $this->aws_node_pool; - } - - public function hasAwsNodePool() - { - return isset($this->aws_node_pool); - } - - public function clearAwsNodePool() - { - unset($this->aws_node_pool); - } - - /** - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $var - * @return $this - */ - public function setAwsNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); - $this->aws_node_pool = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAwsNodePoolId() - { - return $this->aws_node_pool_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAwsNodePoolId($var) - { - GPBUtil::checkString($var, True); - $this->aws_node_pool_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php deleted file mode 100644 index 79ffc0e05dc3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAzureClientRequest - */ -class CreateAzureClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_client = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_client_id = ''; - /** - * If set, only validate the request, but do not actually create the client. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $azureClient Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureClientRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureClient $azureClient, string $azureClientId): self - { - return (new self()) - ->setParent($parent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureClient $azure_client - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * @type string $azure_client_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the client. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClient|null - */ - public function getAzureClient() - { - return $this->azure_client; - } - - public function hasAzureClient() - { - return isset($this->azure_client); - } - - public function clearAzureClient() - { - unset($this->azure_client); - } - - /** - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $var - * @return $this - */ - public function setAzureClient($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClient::class); - $this->azure_client = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureClientId() - { - return $this->azure_client_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureClientId($var) - { - GPBUtil::checkString($var, True); - $this->azure_client_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the client. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the client. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php deleted file mode 100644 index 4a91100acf58..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAzureClusterRequest - */ -class CreateAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_cluster = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_cluster_id = ''; - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster, string $azureClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azure_cluster - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * @type string $azure_cluster_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - public function hasAzureCluster() - { - return isset($this->azure_cluster); - } - - public function clearAzureCluster() - { - unset($this->azure_cluster); - } - - /** - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); - $this->azure_cluster = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureClusterId() - { - return $this->azure_cluster_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureClusterId($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php deleted file mode 100644 index 916c7caa6c2a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest - */ -class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_node_pool = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_node_pool_id = ''; - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureNodePoolRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool, string $azureNodePoolId): self - { - return (new self()) - ->setParent($parent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * @type string $azure_node_pool_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the node - * pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool|null - */ - public function getAzureNodePool() - { - return $this->azure_node_pool; - } - - public function hasAzureNodePool() - { - return isset($this->azure_node_pool); - } - - public function clearAzureNodePool() - { - unset($this->azure_node_pool); - } - - /** - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $var - * @return $this - */ - public function setAzureNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); - $this->azure_node_pool = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureNodePoolId() - { - return $this->azure_node_pool_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureNodePoolId($var) - { - GPBUtil::checkString($var, True); - $this->azure_node_pool_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php deleted file mode 100644 index 0d3c5f6c7d10..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest - */ -class DeleteAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5; - */ - protected $ignore_errors = false; - /** - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * @type bool $allow_missing - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * @type bool $ignore_errors - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * @type string $etag - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - - /** - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php deleted file mode 100644 index af66bc8b136a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php +++ /dev/null @@ -1,288 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest - */ -class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_errors = false; - /** - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAwsClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * @type bool $allow_missing - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $ignore_errors - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * @type string $etag - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - - /** - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php deleted file mode 100644 index c4c621f59cdc..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest - */ -class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_errors = false; - /** - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAwsNodePoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the node - * pool. - * @type bool $allow_missing - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $ignore_errors - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * @type string $etag - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - - /** - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php deleted file mode 100644 index 37807fa3dee7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAzureClientRequest - */ -class DeleteAzureClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param string $name Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureClientRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $allow_missing - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php deleted file mode 100644 index e7da64a454bf..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest - */ -class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - /** - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type bool $allow_missing - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * @type string $etag - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php deleted file mode 100644 index 7855a4ee941d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest - */ -class DeleteAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureNodePoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the node - * pool. - * @type bool $allow_missing - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * @type string $etag - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php deleted file mode 100644 index ddc8d53d7ae1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.gkemulticloud.v1.Fleet - */ -class Fleet extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - /** - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * - * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $membership = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * @type string $membership - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * - * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMembership() - { - return $this->membership; - } - - /** - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * - * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkString($var, True); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php deleted file mode 100644 index b3000ce01b1b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest - */ -class GenerateAttachedClusterInstallManifestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster_id = ''; - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $platform_version = ''; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - - /** - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $attachedClusterId Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest - * - * @experimental - */ - public static function build(string $parent, string $attachedClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAttachedClusterId($attachedClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type string $attached_cluster_id - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * @type string $platform_version - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttachedClusterId() - { - return $this->attached_cluster_id; - } - - /** - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttachedClusterId($var) - { - GPBUtil::checkString($var, True); - $this->attached_cluster_id = $var; - - return $this; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlatformVersion() - { - return $this->platform_version; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlatformVersion($var) - { - GPBUtil::checkString($var, True); - $this->platform_version = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php deleted file mode 100644 index 558f3fe1e5d2..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse - */ -class GenerateAttachedClusterInstallManifestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * - * Generated from protobuf field string manifest = 1; - */ - protected $manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $manifest - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * - * Generated from protobuf field string manifest = 1; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * - * Generated from protobuf field string manifest = 1; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php deleted file mode 100644 index d3d109e81257..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest - */ -class GenerateAwsAccessTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $aws_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $aws_cluster - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php deleted file mode 100644 index 35f1695ffc34..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse - */ -class GenerateAwsAccessTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access_token = ''; - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * Output only. Access token to authenticate to k8s api-server. - * @type \Google\Protobuf\Timestamp $expiration_time - * Output only. Timestamp at which the token will expire. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php deleted file mode 100644 index f189dbc3a504..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest - */ -class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $azure_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $azure_cluster - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php deleted file mode 100644 index 4371394919c5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse - */ -class GenerateAzureAccessTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access_token = ''; - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * Output only. Access token to authenticate to k8s api-server. - * @type \Google\Protobuf\Timestamp $expiration_time - * Output only. Timestamp at which the token will expire. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php deleted file mode 100644 index b5da37d6fa0a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAttachedClusterRequest - */ -class GetAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php deleted file mode 100644 index f2ed61ae77c5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest - */ -class GetAttachedServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAttachedServerConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php deleted file mode 100644 index 1a522d11bbb5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsClusterRequest - */ -class GetAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php deleted file mode 100644 index 549d270d9f3e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest - */ -class GetAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php deleted file mode 100644 index fe925dd0cc05..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest - */ -class GetAwsServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsServerConfigName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsServerConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php deleted file mode 100644 index ce520b46f6bd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureClientRequest - */ -class GetAzureClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php deleted file mode 100644 index c0403c71bf54..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureClusterRequest - */ -class GetAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php deleted file mode 100644 index d491eade7bca..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest - */ -class GetAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php deleted file mode 100644 index 933aca070c01..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest - */ -class GetAzureServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureServerConfigName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureServerConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php deleted file mode 100644 index 2402fd36bcbb..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest - */ -class ImportAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * If set, only validate the request, but do not actually import the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. The name of the fleet membership resource to import. - * - * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet_membership = ''; - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $platform_version = ''; - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. - * - * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distribution = ''; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - - /** - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $fleetMembership Required. The name of the fleet membership resource to import. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ImportAttachedClusterRequest - * - * @experimental - */ - public static function build(string $parent, string $fleetMembership): self - { - return (new self()) - ->setParent($parent) - ->setFleetMembership($fleetMembership); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually import the cluster. - * @type string $fleet_membership - * Required. The name of the fleet membership resource to import. - * @type string $platform_version - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @type string $distribution - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually import the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually import the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. The name of the fleet membership resource to import. - * - * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFleetMembership() - { - return $this->fleet_membership; - } - - /** - * Required. The name of the fleet membership resource to import. - * - * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFleetMembership($var) - { - GPBUtil::checkString($var, True); - $this->fleet_membership = $var; - - return $this; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlatformVersion() - { - return $this->platform_version; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlatformVersion($var) - { - GPBUtil::checkString($var, True); - $this->platform_version = $var; - - return $this; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. - * - * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks"]. - * - * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkString($var, True); - $this->distribution = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php deleted file mode 100644 index dbf9477b5b25..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAttachedClustersRequest - */ -class ListAttachedClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php deleted file mode 100644 index 1252498f6346..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAttachedClustersResponse - */ -class ListAttachedClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; - */ - private $attached_clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedCluster>|\Google\Protobuf\Internal\RepeatedField $attached_clusters - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttachedClusters() - { - return $this->attached_clusters; - } - - /** - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttachedClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); - $this->attached_clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php deleted file mode 100644 index cabd399a840b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsClustersRequest - */ -class ListAwsClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php deleted file mode 100644 index cf2c1a17dca9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsClustersResponse - */ -class ListAwsClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; - */ - private $aws_clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsCluster>|\Google\Protobuf\Internal\RepeatedField $aws_clusters - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAwsClusters() - { - return $this->aws_clusters; - } - - /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAwsClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); - $this->aws_clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php deleted file mode 100644 index ec512d71b6af..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest - */ -class ListAwsNodePoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php deleted file mode 100644 index e6a681467d5a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse - */ -class ListAwsNodePoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; - */ - private $aws_node_pools; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePool>|\Google\Protobuf\Internal\RepeatedField $aws_node_pools - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAwsNodePools() - { - return $this->aws_node_pools; - } - - /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAwsNodePools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); - $this->aws_node_pools = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php deleted file mode 100644 index 721195797caf..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClientsRequest - */ -class ListAzureClientsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php deleted file mode 100644 index 6ec3fccc2c48..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClientsResponse - */ -class ListAzureClientsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; - */ - private $azure_clients; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClient>|\Google\Protobuf\Internal\RepeatedField $azure_clients - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAzureClients() - { - return $this->azure_clients; - } - - /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClient>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAzureClients($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClient::class); - $this->azure_clients = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php deleted file mode 100644 index c8d3b2bc6110..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClustersRequest - */ -class ListAzureClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php deleted file mode 100644 index ed2af0dfa8b5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClustersResponse - */ -class ListAzureClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; - */ - private $azure_clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureCluster>|\Google\Protobuf\Internal\RepeatedField $azure_clusters - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAzureClusters() - { - return $this->azure_clusters; - } - - /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAzureClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); - $this->azure_clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php deleted file mode 100644 index 4a48b8d5a27d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest - */ -class ListAzureNodePoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php deleted file mode 100644 index dba3b96d705d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse - */ -class ListAzureNodePoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; - */ - private $azure_node_pools; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePool>|\Google\Protobuf\Internal\RepeatedField $azure_node_pools - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAzureNodePools() - { - return $this->azure_node_pools; - } - - /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAzureNodePools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); - $this->azure_node_pools = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php deleted file mode 100644 index 422fc56a7d5e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.LoggingComponentConfig - */ -class LoggingComponentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The components to be enabled. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; - */ - private $enable_components; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $enable_components - * The components to be enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * The components to be enabled. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnableComponents() - { - return $this->enable_components; - } - - /** - * The components to be enabled. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnableComponents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig\Component::class); - $this->enable_components = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php deleted file mode 100644 index 7bbb2b8b88ac..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component - */ -class Component -{ - /** - * No component is specified - * - * Generated from protobuf enum COMPONENT_UNSPECIFIED = 0; - */ - const COMPONENT_UNSPECIFIED = 0; - /** - * This indicates that system logging components is enabled. - * - * Generated from protobuf enum SYSTEM_COMPONENTS = 1; - */ - const SYSTEM_COMPONENTS = 1; - /** - * This indicates that user workload logging component is enabled. - * - * Generated from protobuf enum WORKLOADS = 2; - */ - const WORKLOADS = 2; - - private static $valueToName = [ - self::COMPONENT_UNSPECIFIED => 'COMPONENT_UNSPECIFIED', - self::SYSTEM_COMPONENTS => 'SYSTEM_COMPONENTS', - self::WORKLOADS => 'WORKLOADS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Component::class, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig_Component::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php deleted file mode 100644 index 85b0a7595ebf..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkemulticloud.v1.LoggingConfig - */ -class LoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The configuration of the logging components; - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; - */ - protected $component_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig $component_config - * The configuration of the logging components; - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * The configuration of the logging components; - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig|null - */ - public function getComponentConfig() - { - return $this->component_config; - } - - public function hasComponentConfig() - { - return isset($this->component_config); - } - - public function clearComponentConfig() - { - unset($this->component_config); - } - - /** - * The configuration of the logging components; - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig $var - * @return $this - */ - public function setComponentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig::class); - $this->component_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php deleted file mode 100644 index c3f7e469972b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.gkemulticloud.v1.ManagedPrometheusConfig - */ -class ManagedPrometheusConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Enable Managed Collection. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Enable Managed Collection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Enable Managed Collection. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enable Managed Collection. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php deleted file mode 100644 index abbd020c984a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.MaxPodsConstraint - */ -class MaxPodsConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The maximum number of pods to schedule on a single node. - * - * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_pods_per_node = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_pods_per_node - * Required. The maximum number of pods to schedule on a single node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The maximum number of pods to schedule on a single node. - * - * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getMaxPodsPerNode() - { - return $this->max_pods_per_node; - } - - /** - * Required. The maximum number of pods to schedule on a single node. - * - * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setMaxPodsPerNode($var) - { - GPBUtil::checkInt64($var); - $this->max_pods_per_node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php deleted file mode 100644 index a6b9a2e0a799..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkemulticloud.v1.MonitoringConfig - */ -class MonitoringConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; - */ - protected $managed_prometheus_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $managed_prometheus_config - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; - * @return \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig|null - */ - public function getManagedPrometheusConfig() - { - return $this->managed_prometheus_config; - } - - public function hasManagedPrometheusConfig() - { - return isset($this->managed_prometheus_config); - } - - public function clearManagedPrometheusConfig() - { - unset($this->managed_prometheus_config); - } - - /** - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; - * @param \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $var - * @return $this - */ - public function setManagedPrometheusConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig::class); - $this->managed_prometheus_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php deleted file mode 100644 index 3008c9dd75ef..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkemulticloud.v1.NodeTaint - */ -class NodeTaint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Key for the taint. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Required. Value for the taint. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - /** - * Required. The taint effect. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $effect = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. Key for the taint. - * @type string $value - * Required. Value for the taint. - * @type int $effect - * Required. The taint effect. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Key for the taint. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. Key for the taint. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Required. Value for the taint. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. Value for the taint. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Required. The taint effect. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEffect() - { - return $this->effect; - } - - /** - * Required. The taint effect. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEffect($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\NodeTaint\Effect::class); - $this->effect = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php deleted file mode 100644 index e91ecf54c3c1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkemulticloud.v1.NodeTaint.Effect - */ -class Effect -{ - /** - * Not set. - * - * Generated from protobuf enum EFFECT_UNSPECIFIED = 0; - */ - const EFFECT_UNSPECIFIED = 0; - /** - * Do not allow new pods to schedule onto the node unless they tolerate the - * taint, but allow all pods submitted to Kubelet without going through the - * scheduler to start, and allow all already-running pods to continue - * running. Enforced by the scheduler. - * - * Generated from protobuf enum NO_SCHEDULE = 1; - */ - const NO_SCHEDULE = 1; - /** - * Like TaintEffectNoSchedule, but the scheduler tries not to schedule - * new pods onto the node, rather than prohibiting new pods from scheduling - * onto the node entirely. Enforced by the scheduler. - * - * Generated from protobuf enum PREFER_NO_SCHEDULE = 2; - */ - const PREFER_NO_SCHEDULE = 2; - /** - * Evict any already-running pods that do not tolerate the taint. - * Currently enforced by NodeController. - * - * Generated from protobuf enum NO_EXECUTE = 3; - */ - const NO_EXECUTE = 3; - - private static $valueToName = [ - self::EFFECT_UNSPECIFIED => 'EFFECT_UNSPECIFIED', - self::NO_SCHEDULE => 'NO_SCHEDULE', - self::PREFER_NO_SCHEDULE => 'PREFER_NO_SCHEDULE', - self::NO_EXECUTE => 'NO_EXECUTE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Effect::class, \Google\Cloud\GkeMultiCloud\V1\NodeTaint_Effect::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php deleted file mode 100644 index da707c71cf06..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.gkemulticloud.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time at which this operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this operation was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The name of the resource associated to this operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_detail = ''; - /** - * Output only. Human-readable status of any error that occurred during the - * operation. - * - * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_detail = ''; - /** - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * - * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time at which this operation was completed. - * @type string $target - * Output only. The name of the resource associated to this operation. - * @type string $status_detail - * Output only. Human-readable status of the operation, if any. - * @type string $error_detail - * Output only. Human-readable status of any error that occurred during the - * operation. - * @type string $verb - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * @type bool $requested_cancellation - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time at which this operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this operation was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time at which this operation was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The name of the resource associated to this operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. The name of the resource associated to this operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Output only. Human-readable status of any error that occurred during the - * operation. - * - * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getErrorDetail() - { - return $this->error_detail; - } - - /** - * Output only. Human-readable status of any error that occurred during the - * operation. - * - * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setErrorDetail($var) - { - GPBUtil::checkString($var, True); - $this->error_detail = $var; - - return $this; - } - - /** - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * - * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * - * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php deleted file mode 100644 index c78be2466d12..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.ReplicaPlacement - */ -class ReplicaPlacement extends \Google\Protobuf\Internal\Message -{ - /** - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * - * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet_id = ''; - /** - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * - * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_availability_zone = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $subnet_id - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * @type string $azure_availability_zone - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * - * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * - * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * - * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureAvailabilityZone() - { - return $this->azure_availability_zone; - } - - /** - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * - * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureAvailabilityZone($var) - { - GPBUtil::checkString($var, True); - $this->azure_availability_zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php deleted file mode 100644 index a45ece2a28f9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest - */ -class UpdateAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster = null; - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attached_cluster - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * @type bool $validate_only - * If set, only validate the request, but do not actually update the cluster. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster|null - */ - public function getAttachedCluster() - { - return $this->attached_cluster; - } - - public function hasAttachedCluster() - { - return isset($this->attached_cluster); - } - - public function clearAttachedCluster() - { - unset($this->attached_cluster); - } - - /** - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $var - * @return $this - */ - public function setAttachedCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); - $this->attached_cluster = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php deleted file mode 100644 index 401b27d1d3e5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - */ -class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_cluster = null; - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AwsCluster $aws_cluster - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but do not actually update the cluster. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - public function hasAwsCluster() - { - return isset($this->aws_cluster); - } - - public function clearAwsCluster() - { - unset($this->aws_cluster); - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); - $this->aws_cluster = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php deleted file mode 100644 index e118a1b99de6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php +++ /dev/null @@ -1,336 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest - */ -class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_node_pool = null; - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $aws_node_pool - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but don't actually update the node pool. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool|null - */ - public function getAwsNodePool() - { - return $this->aws_node_pool; - } - - public function hasAwsNodePool() - { - return isset($this->aws_node_pool); - } - - public function clearAwsNodePool() - { - unset($this->aws_node_pool); - } - - /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $var - * @return $this - */ - public function setAwsNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); - $this->aws_node_pool = $var; - - return $this; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php deleted file mode 100644 index 19ebd29cfa43..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest - */ -class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_cluster = null; - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azure_cluster - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but do not actually update the cluster. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - public function hasAzureCluster() - { - return isset($this->azure_cluster); - } - - public function clearAzureCluster() - { - unset($this->azure_cluster); - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); - $this->azure_cluster = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php deleted file mode 100644 index bb297a85b6dd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest - */ -class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_node_pool = null; - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureNodePoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but don't actually update the node pool. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool|null - */ - public function getAzureNodePool() - { - return $this->azure_node_pool; - } - - public function hasAzureNodePool() - { - return isset($this->azure_node_pool); - } - - public function clearAzureNodePool() - { - unset($this->azure_node_pool); - } - - /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $var - * @return $this - */ - public function setAzureNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); - $this->azure_node_pool = $var; - - return $this; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php deleted file mode 100644 index 261f7d8542a3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.gkemulticloud.v1.WorkloadIdentityConfig - */ -class WorkloadIdentityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The OIDC issuer URL for this cluster. - * - * Generated from protobuf field string issuer_uri = 1; - */ - protected $issuer_uri = ''; - /** - * The Workload Identity Pool associated to the cluster. - * - * Generated from protobuf field string workload_pool = 2; - */ - protected $workload_pool = ''; - /** - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * - * Generated from protobuf field string identity_provider = 3; - */ - protected $identity_provider = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer_uri - * The OIDC issuer URL for this cluster. - * @type string $workload_pool - * The Workload Identity Pool associated to the cluster. - * @type string $identity_provider - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * The OIDC issuer URL for this cluster. - * - * Generated from protobuf field string issuer_uri = 1; - * @return string - */ - public function getIssuerUri() - { - return $this->issuer_uri; - } - - /** - * The OIDC issuer URL for this cluster. - * - * Generated from protobuf field string issuer_uri = 1; - * @param string $var - * @return $this - */ - public function setIssuerUri($var) - { - GPBUtil::checkString($var, True); - $this->issuer_uri = $var; - - return $this; - } - - /** - * The Workload Identity Pool associated to the cluster. - * - * Generated from protobuf field string workload_pool = 2; - * @return string - */ - public function getWorkloadPool() - { - return $this->workload_pool; - } - - /** - * The Workload Identity Pool associated to the cluster. - * - * Generated from protobuf field string workload_pool = 2; - * @param string $var - * @return $this - */ - public function setWorkloadPool($var) - { - GPBUtil::checkString($var, True); - $this->workload_pool = $var; - - return $this; - } - - /** - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * - * Generated from protobuf field string identity_provider = 3; - * @return string - */ - public function getIdentityProvider() - { - return $this->identity_provider; - } - - /** - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * - * Generated from protobuf field string identity_provider = 3; - * @param string $var - * @return $this - */ - public function setIdentityProvider($var) - { - GPBUtil::checkString($var, True); - $this->identity_provider = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php deleted file mode 100644 index e895597d48c9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php +++ /dev/null @@ -1,145 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $attachedClusterPlatformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @param string $attachedClusterDistribution The Kubernetes distribution of the underlying attached cluster. - * - * Supported values: ["eks", "aks", "generic"]. - * @param string $attachedClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - * @param string $attachedClusterId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_attached_cluster_sample( - string $formattedParent, - string $attachedClusterPlatformVersion, - string $attachedClusterDistribution, - string $attachedClusterFleetProject, - string $attachedClusterId -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedClusterFleet = (new Fleet()) - ->setProject($attachedClusterFleetProject); - $attachedCluster = (new AttachedCluster()) - ->setOidcConfig($attachedClusterOidcConfig) - ->setPlatformVersion($attachedClusterPlatformVersion) - ->setDistribution($attachedClusterDistribution) - ->setFleet($attachedClusterFleet); - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->createAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AttachedCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterPlatformVersion = '[PLATFORM_VERSION]'; - $attachedClusterDistribution = '[DISTRIBUTION]'; - $attachedClusterFleetProject = '[PROJECT]'; - $attachedClusterId = '[ATTACHED_CLUSTER_ID]'; - - create_attached_cluster_sample( - $formattedParent, - $attachedClusterPlatformVersion, - $attachedClusterDistribution, - $attachedClusterFleetProject, - $attachedClusterId - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php deleted file mode 100644 index 2019bf4fb937..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php +++ /dev/null @@ -1,96 +0,0 @@ -/locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - */ -function delete_attached_cluster_sample(string $formattedName): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new DeleteAttachedClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->deleteAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AttachedClustersClient::attachedClusterName( - '[PROJECT]', - '[LOCATION]', - '[ATTACHED_CLUSTER]' - ); - - delete_attached_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php deleted file mode 100644 index cf483a4552e3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php +++ /dev/null @@ -1,109 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $attachedClusterId A client provided ID of the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * - * Membership names are formatted as - * `projects//locations//memberships/`. - * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - */ -function generate_attached_cluster_install_manifest_sample( - string $formattedParent, - string $attachedClusterId, - string $platformVersion -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new GenerateAttachedClusterInstallManifestRequest()) - ->setParent($formattedParent) - ->setAttachedClusterId($attachedClusterId) - ->setPlatformVersion($platformVersion); - - // Call the API and handle any network failures. - try { - /** @var GenerateAttachedClusterInstallManifestResponse $response */ - $response = $attachedClustersClient->generateAttachedClusterInstallManifest($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = '[ATTACHED_CLUSTER_ID]'; - $platformVersion = '[PLATFORM_VERSION]'; - - generate_attached_cluster_install_manifest_sample( - $formattedParent, - $attachedClusterId, - $platformVersion - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php deleted file mode 100644 index 21825508bbc6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - */ -function get_attached_cluster_sample(string $formattedName): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new GetAttachedClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AttachedCluster $response */ - $response = $attachedClustersClient->getAttachedCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AttachedClustersClient::attachedClusterName( - '[PROJECT]', - '[LOCATION]', - '[ATTACHED_CLUSTER]' - ); - - get_attached_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php deleted file mode 100644 index 99f834a49d4c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//attachedServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field. - */ -function get_attached_server_config_sample(string $formattedName): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new GetAttachedServerConfigRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AttachedServerConfig $response */ - $response = $attachedClustersClient->getAttachedServerConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AttachedClustersClient::attachedServerConfigName('[PROJECT]', '[LOCATION]'); - - get_attached_server_config_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php deleted file mode 100644 index 6e935b3a2d9e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php +++ /dev/null @@ -1,118 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $fleetMembership The name of the fleet membership resource to import. - * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @param string $distribution The Kubernetes distribution of the underlying attached cluster. - * - * Supported values: ["eks", "aks"]. - */ -function import_attached_cluster_sample( - string $formattedParent, - string $fleetMembership, - string $platformVersion, - string $distribution -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new ImportAttachedClusterRequest()) - ->setParent($formattedParent) - ->setFleetMembership($fleetMembership) - ->setPlatformVersion($platformVersion) - ->setDistribution($distribution); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->importAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AttachedCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = '[FLEET_MEMBERSHIP]'; - $platformVersion = '[PLATFORM_VERSION]'; - $distribution = '[DISTRIBUTION]'; - - import_attached_cluster_sample($formattedParent, $fleetMembership, $platformVersion, $distribution); -} -// [END gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php deleted file mode 100644 index b9fabcf1a3b4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - */ -function list_attached_clusters_sample(string $formattedParent): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new ListAttachedClustersRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $attachedClustersClient->listAttachedClusters($request); - - /** @var AttachedCluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_attached_clusters_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php deleted file mode 100644 index 04b14400dc18..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php +++ /dev/null @@ -1,117 +0,0 @@ -`. - */ -function update_attached_cluster_sample( - string $attachedClusterPlatformVersion, - string $attachedClusterDistribution, - string $attachedClusterFleetProject -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedClusterFleet = (new Fleet()) - ->setProject($attachedClusterFleetProject); - $attachedCluster = (new AttachedCluster()) - ->setOidcConfig($attachedClusterOidcConfig) - ->setPlatformVersion($attachedClusterPlatformVersion) - ->setDistribution($attachedClusterDistribution) - ->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAttachedClusterRequest()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->updateAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AttachedCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $attachedClusterPlatformVersion = '[PLATFORM_VERSION]'; - $attachedClusterDistribution = '[DISTRIBUTION]'; - $attachedClusterFleetProject = '[PROJECT]'; - - update_attached_cluster_sample( - $attachedClusterPlatformVersion, - $attachedClusterDistribution, - $attachedClusterFleetProject - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php deleted file mode 100644 index 1f217acadf94..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php +++ /dev/null @@ -1,220 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - * @param string $awsClusterNetworkingVpcId The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * - * This field cannot be changed after creation. - * @param string $awsClusterNetworkingPodAddressCidrBlocksElement All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * @param string $awsClusterNetworkingServiceAddressCidrBlocksElement All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * @param string $awsClusterAwsRegion The AWS region where the cluster runs. - * - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * @param string $awsClusterControlPlaneVersion The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @param string $awsClusterControlPlaneSubnetIdsElement The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * @param string $awsClusterControlPlaneIamInstanceProfile The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * @param string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt cluster secrets. - * @param string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param string $awsClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - * @param string $awsClusterId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_aws_cluster_sample( - string $formattedParent, - string $awsClusterNetworkingVpcId, - string $awsClusterNetworkingPodAddressCidrBlocksElement, - string $awsClusterNetworkingServiceAddressCidrBlocksElement, - string $awsClusterAwsRegion, - string $awsClusterControlPlaneVersion, - string $awsClusterControlPlaneSubnetIdsElement, - string $awsClusterControlPlaneIamInstanceProfile, - string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterFleetProject, - string $awsClusterId -): void { - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $awsClusterNetworkingPodAddressCidrBlocks = [$awsClusterNetworkingPodAddressCidrBlocksElement,]; - $awsClusterNetworkingServiceAddressCidrBlocks = [ - $awsClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $awsClusterNetworking = (new AwsClusterNetworking()) - ->setVpcId($awsClusterNetworkingVpcId) - ->setPodAddressCidrBlocks($awsClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($awsClusterNetworkingServiceAddressCidrBlocks); - $awsClusterControlPlaneSubnetIds = [$awsClusterControlPlaneSubnetIdsElement,]; - $awsClusterControlPlaneDatabaseEncryption = (new AwsDatabaseEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneDatabaseEncryptionKmsKeyArn); - $awsClusterControlPlaneAwsServicesAuthentication = (new AwsServicesAuthentication()) - ->setRoleArn($awsClusterControlPlaneAwsServicesAuthenticationRoleArn); - $awsClusterControlPlaneConfigEncryption = (new AwsConfigEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneConfigEncryptionKmsKeyArn); - $awsClusterControlPlane = (new AwsControlPlane()) - ->setVersion($awsClusterControlPlaneVersion) - ->setSubnetIds($awsClusterControlPlaneSubnetIds) - ->setIamInstanceProfile($awsClusterControlPlaneIamInstanceProfile) - ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) - ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) - ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); - $awsClusterAuthorization = new AwsAuthorization(); - $awsClusterFleet = (new Fleet()) - ->setProject($awsClusterFleetProject); - $awsCluster = (new AwsCluster()) - ->setNetworking($awsClusterNetworking) - ->setAwsRegion($awsClusterAwsRegion) - ->setControlPlane($awsClusterControlPlane) - ->setAuthorization($awsClusterAuthorization) - ->setFleet($awsClusterFleet); - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->createAwsCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AwsClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $awsClusterNetworkingVpcId = '[VPC_ID]'; - $awsClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $awsClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $awsClusterAwsRegion = '[AWS_REGION]'; - $awsClusterControlPlaneVersion = '[VERSION]'; - $awsClusterControlPlaneSubnetIdsElement = '[SUBNET_IDS]'; - $awsClusterControlPlaneIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; - $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterFleetProject = '[PROJECT]'; - $awsClusterId = '[AWS_CLUSTER_ID]'; - - create_aws_cluster_sample( - $formattedParent, - $awsClusterNetworkingVpcId, - $awsClusterNetworkingPodAddressCidrBlocksElement, - $awsClusterNetworkingServiceAddressCidrBlocksElement, - $awsClusterAwsRegion, - $awsClusterControlPlaneVersion, - $awsClusterControlPlaneSubnetIdsElement, - $awsClusterControlPlaneIamInstanceProfile, - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterFleetProject, - $awsClusterId - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php deleted file mode 100644 index 225e3f22700a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php +++ /dev/null @@ -1,168 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * @param string $awsNodePoolVersion The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the - * pool. - * @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @param int $awsNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * @param string $awsNodePoolSubnetId The subnet where the node pool node run. - * @param int $awsNodePoolMaxPodsConstraintMaxPodsPerNode The maximum number of pods to schedule on a single node. - * @param string $awsNodePoolId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_aws_node_pool_sample( - string $formattedParent, - string $awsNodePoolVersion, - string $awsNodePoolConfigIamInstanceProfile, - string $awsNodePoolConfigConfigEncryptionKmsKeyArn, - int $awsNodePoolAutoscalingMinNodeCount, - int $awsNodePoolAutoscalingMaxNodeCount, - string $awsNodePoolSubnetId, - int $awsNodePoolMaxPodsConstraintMaxPodsPerNode, - string $awsNodePoolId -): void { - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $awsNodePoolConfigConfigEncryption = (new AwsConfigEncryption()) - ->setKmsKeyArn($awsNodePoolConfigConfigEncryptionKmsKeyArn); - $awsNodePoolConfig = (new AwsNodeConfig()) - ->setIamInstanceProfile($awsNodePoolConfigIamInstanceProfile) - ->setConfigEncryption($awsNodePoolConfigConfigEncryption); - $awsNodePoolAutoscaling = (new AwsNodePoolAutoscaling()) - ->setMinNodeCount($awsNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($awsNodePoolAutoscalingMaxNodeCount); - $awsNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($awsNodePoolMaxPodsConstraintMaxPodsPerNode); - $awsNodePool = (new AwsNodePool()) - ->setVersion($awsNodePoolVersion) - ->setConfig($awsNodePoolConfig) - ->setAutoscaling($awsNodePoolAutoscaling) - ->setSubnetId($awsNodePoolSubnetId) - ->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $request = (new CreateAwsNodePoolRequest()) - ->setParent($formattedParent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->createAwsNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsNodePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePoolVersion = '[VERSION]'; - $awsNodePoolConfigIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsNodePoolConfigConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsNodePoolAutoscalingMinNodeCount = 0; - $awsNodePoolAutoscalingMaxNodeCount = 0; - $awsNodePoolSubnetId = '[SUBNET_ID]'; - $awsNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - $awsNodePoolId = '[AWS_NODE_POOL_ID]'; - - create_aws_node_pool_sample( - $formattedParent, - $awsNodePoolVersion, - $awsNodePoolConfigIamInstanceProfile, - $awsNodePoolConfigConfigEncryptionKmsKeyArn, - $awsNodePoolAutoscalingMinNodeCount, - $awsNodePoolAutoscalingMaxNodeCount, - $awsNodePoolSubnetId, - $awsNodePoolMaxPodsConstraintMaxPodsPerNode, - $awsNodePoolId - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php deleted file mode 100644 index 60b7bd24972c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php +++ /dev/null @@ -1,95 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function delete_aws_cluster_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new DeleteAwsClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->deleteAwsCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - - delete_aws_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php deleted file mode 100644 index 394f463f21e8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - */ -function delete_aws_node_pool_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new DeleteAwsNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->deleteAwsNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AwsClustersClient::awsNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]', - '[AWS_NODE_POOL]' - ); - - delete_aws_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php deleted file mode 100644 index 22f65a87c014..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function generate_aws_access_token_sample(string $formattedAwsCluster): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GenerateAwsAccessTokenRequest()) - ->setAwsCluster($formattedAwsCluster); - - // Call the API and handle any network failures. - try { - /** @var GenerateAwsAccessTokenResponse $response */ - $response = $awsClustersClient->generateAwsAccessToken($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAwsCluster = AwsClustersClient::awsClusterName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]' - ); - - generate_aws_access_token_sample($formattedAwsCluster); -} -// [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php deleted file mode 100644 index 8274cfa21370..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function get_aws_cluster_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GetAwsClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AwsCluster $response */ - $response = $awsClustersClient->getAwsCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - - get_aws_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php deleted file mode 100644 index b3b8771c0b23..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - */ -function get_aws_node_pool_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GetAwsNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AwsNodePool $response */ - $response = $awsClustersClient->getAwsNodePool($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AwsClustersClient::awsNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]', - '[AWS_NODE_POOL]' - ); - - get_aws_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php deleted file mode 100644 index c450dd0bcef3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//awsServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsServerConfigName()} for help formatting this field. - */ -function get_aws_server_config_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GetAwsServerConfigRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AwsServerConfig $response */ - $response = $awsClustersClient->getAwsServerConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AwsClustersClient::awsServerConfigName('[PROJECT]', '[LOCATION]'); - - get_aws_server_config_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php deleted file mode 100644 index 7f82224f8ca8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - */ -function list_aws_clusters_sample(string $formattedParent): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new ListAwsClustersRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $awsClustersClient->listAwsClusters($request); - - /** @var AwsCluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AwsClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_aws_clusters_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php deleted file mode 100644 index 9d94de3abcb2..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function list_aws_node_pools_sample(string $formattedParent): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new ListAwsNodePoolsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $awsClustersClient->listAwsNodePools($request); - - /** @var AwsNodePool $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - - list_aws_node_pools_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php deleted file mode 100644 index e5b56934207f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php +++ /dev/null @@ -1,192 +0,0 @@ -`. - */ -function update_aws_cluster_sample( - string $awsClusterNetworkingVpcId, - string $awsClusterNetworkingPodAddressCidrBlocksElement, - string $awsClusterNetworkingServiceAddressCidrBlocksElement, - string $awsClusterAwsRegion, - string $awsClusterControlPlaneVersion, - string $awsClusterControlPlaneSubnetIdsElement, - string $awsClusterControlPlaneIamInstanceProfile, - string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterFleetProject -): void { - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $awsClusterNetworkingPodAddressCidrBlocks = [$awsClusterNetworkingPodAddressCidrBlocksElement,]; - $awsClusterNetworkingServiceAddressCidrBlocks = [ - $awsClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $awsClusterNetworking = (new AwsClusterNetworking()) - ->setVpcId($awsClusterNetworkingVpcId) - ->setPodAddressCidrBlocks($awsClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($awsClusterNetworkingServiceAddressCidrBlocks); - $awsClusterControlPlaneSubnetIds = [$awsClusterControlPlaneSubnetIdsElement,]; - $awsClusterControlPlaneDatabaseEncryption = (new AwsDatabaseEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneDatabaseEncryptionKmsKeyArn); - $awsClusterControlPlaneAwsServicesAuthentication = (new AwsServicesAuthentication()) - ->setRoleArn($awsClusterControlPlaneAwsServicesAuthenticationRoleArn); - $awsClusterControlPlaneConfigEncryption = (new AwsConfigEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneConfigEncryptionKmsKeyArn); - $awsClusterControlPlane = (new AwsControlPlane()) - ->setVersion($awsClusterControlPlaneVersion) - ->setSubnetIds($awsClusterControlPlaneSubnetIds) - ->setIamInstanceProfile($awsClusterControlPlaneIamInstanceProfile) - ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) - ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) - ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); - $awsClusterAuthorization = new AwsAuthorization(); - $awsClusterFleet = (new Fleet()) - ->setProject($awsClusterFleetProject); - $awsCluster = (new AwsCluster()) - ->setNetworking($awsClusterNetworking) - ->setAwsRegion($awsClusterAwsRegion) - ->setControlPlane($awsClusterControlPlane) - ->setAuthorization($awsClusterAuthorization) - ->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAwsClusterRequest()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->updateAwsCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $awsClusterNetworkingVpcId = '[VPC_ID]'; - $awsClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $awsClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $awsClusterAwsRegion = '[AWS_REGION]'; - $awsClusterControlPlaneVersion = '[VERSION]'; - $awsClusterControlPlaneSubnetIdsElement = '[SUBNET_IDS]'; - $awsClusterControlPlaneIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; - $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterFleetProject = '[PROJECT]'; - - update_aws_cluster_sample( - $awsClusterNetworkingVpcId, - $awsClusterNetworkingPodAddressCidrBlocksElement, - $awsClusterNetworkingServiceAddressCidrBlocksElement, - $awsClusterAwsRegion, - $awsClusterControlPlaneVersion, - $awsClusterControlPlaneSubnetIdsElement, - $awsClusterControlPlaneIamInstanceProfile, - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterFleetProject - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php deleted file mode 100644 index b3ca4e0cc0c7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php +++ /dev/null @@ -1,140 +0,0 @@ -setKmsKeyArn($awsNodePoolConfigConfigEncryptionKmsKeyArn); - $awsNodePoolConfig = (new AwsNodeConfig()) - ->setIamInstanceProfile($awsNodePoolConfigIamInstanceProfile) - ->setConfigEncryption($awsNodePoolConfigConfigEncryption); - $awsNodePoolAutoscaling = (new AwsNodePoolAutoscaling()) - ->setMinNodeCount($awsNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($awsNodePoolAutoscalingMaxNodeCount); - $awsNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($awsNodePoolMaxPodsConstraintMaxPodsPerNode); - $awsNodePool = (new AwsNodePool()) - ->setVersion($awsNodePoolVersion) - ->setConfig($awsNodePoolConfig) - ->setAutoscaling($awsNodePoolAutoscaling) - ->setSubnetId($awsNodePoolSubnetId) - ->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAwsNodePoolRequest()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->updateAwsNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsNodePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $awsNodePoolVersion = '[VERSION]'; - $awsNodePoolConfigIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsNodePoolConfigConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsNodePoolAutoscalingMinNodeCount = 0; - $awsNodePoolAutoscalingMaxNodeCount = 0; - $awsNodePoolSubnetId = '[SUBNET_ID]'; - $awsNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - - update_aws_node_pool_sample( - $awsNodePoolVersion, - $awsNodePoolConfigIamInstanceProfile, - $awsNodePoolConfigConfigEncryptionKmsKeyArn, - $awsNodePoolAutoscalingMinNodeCount, - $awsNodePoolAutoscalingMaxNodeCount, - $awsNodePoolSubnetId, - $awsNodePoolMaxPodsConstraintMaxPodsPerNode - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php deleted file mode 100644 index 1bd2f69f9612..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php +++ /dev/null @@ -1,127 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param string $azureClientTenantId The Azure Active Directory Tenant ID. - * @param string $azureClientApplicationId The Azure Active Directory Application ID. - * @param string $azureClientId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_azure_client_sample( - string $formattedParent, - string $azureClientTenantId, - string $azureClientApplicationId, - string $azureClientId -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureClient = (new AzureClient()) - ->setTenantId($azureClientTenantId) - ->setApplicationId($azureClientApplicationId); - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->createAzureClient($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureClient $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $azureClientTenantId = '[TENANT_ID]'; - $azureClientApplicationId = '[APPLICATION_ID]'; - $azureClientId = '[AZURE_CLIENT_ID]'; - - create_azure_client_sample( - $formattedParent, - $azureClientTenantId, - $azureClientApplicationId, - $azureClientId - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php deleted file mode 100644 index 55a80ce0dbb3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php +++ /dev/null @@ -1,213 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param string $azureClusterAzureRegion The Azure region where the cluster runs. - * - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * @param string $azureClusterResourceGroupId The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingPodAddressCidrBlocksElement The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingServiceAddressCidrBlocksElement The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creating a cluster. - * @param string $azureClusterControlPlaneVersion The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - * @param string $azureClusterId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_azure_cluster_sample( - string $formattedParent, - string $azureClusterAzureRegion, - string $azureClusterResourceGroupId, - string $azureClusterNetworkingVirtualNetworkId, - string $azureClusterNetworkingPodAddressCidrBlocksElement, - string $azureClusterNetworkingServiceAddressCidrBlocksElement, - string $azureClusterControlPlaneVersion, - string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterFleetProject, - string $azureClusterId -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureClusterNetworkingPodAddressCidrBlocks = [ - $azureClusterNetworkingPodAddressCidrBlocksElement, - ]; - $azureClusterNetworkingServiceAddressCidrBlocks = [ - $azureClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $azureClusterNetworking = (new AzureClusterNetworking()) - ->setVirtualNetworkId($azureClusterNetworkingVirtualNetworkId) - ->setPodAddressCidrBlocks($azureClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($azureClusterNetworkingServiceAddressCidrBlocks); - $azureClusterControlPlaneSshConfig = (new AzureSshConfig()) - ->setAuthorizedKey($azureClusterControlPlaneSshConfigAuthorizedKey); - $azureClusterControlPlane = (new AzureControlPlane()) - ->setVersion($azureClusterControlPlaneVersion) - ->setSshConfig($azureClusterControlPlaneSshConfig); - $azureClusterAuthorization = new AzureAuthorization(); - $azureClusterFleet = (new Fleet()) - ->setProject($azureClusterFleetProject); - $azureCluster = (new AzureCluster()) - ->setAzureRegion($azureClusterAzureRegion) - ->setResourceGroupId($azureClusterResourceGroupId) - ->setNetworking($azureClusterNetworking) - ->setControlPlane($azureClusterControlPlane) - ->setAuthorization($azureClusterAuthorization) - ->setFleet($azureClusterFleet); - $request = (new CreateAzureClusterRequest()) - ->setParent($formattedParent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->createAzureCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $azureClusterAzureRegion = '[AZURE_REGION]'; - $azureClusterResourceGroupId = '[RESOURCE_GROUP_ID]'; - $azureClusterNetworkingVirtualNetworkId = '[VIRTUAL_NETWORK_ID]'; - $azureClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $azureClusterControlPlaneVersion = '[VERSION]'; - $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureClusterFleetProject = '[PROJECT]'; - $azureClusterId = '[AZURE_CLUSTER_ID]'; - - create_azure_cluster_sample( - $formattedParent, - $azureClusterAzureRegion, - $azureClusterResourceGroupId, - $azureClusterNetworkingVirtualNetworkId, - $azureClusterNetworkingPodAddressCidrBlocksElement, - $azureClusterNetworkingServiceAddressCidrBlocksElement, - $azureClusterControlPlaneVersion, - $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterFleetProject, - $azureClusterId - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php deleted file mode 100644 index 99bebfaff869..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php +++ /dev/null @@ -1,166 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * @param string $azureNodePoolVersion The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * @param string $azureNodePoolConfigSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * @param string $azureNodePoolSubnetId The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * @param int $azureNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @param int $azureNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * @param int $azureNodePoolMaxPodsConstraintMaxPodsPerNode The maximum number of pods to schedule on a single node. - * @param string $azureNodePoolId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_azure_node_pool_sample( - string $formattedParent, - string $azureNodePoolVersion, - string $azureNodePoolConfigSshConfigAuthorizedKey, - string $azureNodePoolSubnetId, - int $azureNodePoolAutoscalingMinNodeCount, - int $azureNodePoolAutoscalingMaxNodeCount, - int $azureNodePoolMaxPodsConstraintMaxPodsPerNode, - string $azureNodePoolId -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureNodePoolConfigSshConfig = (new AzureSshConfig()) - ->setAuthorizedKey($azureNodePoolConfigSshConfigAuthorizedKey); - $azureNodePoolConfig = (new AzureNodeConfig()) - ->setSshConfig($azureNodePoolConfigSshConfig); - $azureNodePoolAutoscaling = (new AzureNodePoolAutoscaling()) - ->setMinNodeCount($azureNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($azureNodePoolAutoscalingMaxNodeCount); - $azureNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($azureNodePoolMaxPodsConstraintMaxPodsPerNode); - $azureNodePool = (new AzureNodePool()) - ->setVersion($azureNodePoolVersion) - ->setConfig($azureNodePoolConfig) - ->setSubnetId($azureNodePoolSubnetId) - ->setAutoscaling($azureNodePoolAutoscaling) - ->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $request = (new CreateAzureNodePoolRequest()) - ->setParent($formattedParent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->createAzureNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureNodePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - $azureNodePoolVersion = '[VERSION]'; - $azureNodePoolConfigSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureNodePoolSubnetId = '[SUBNET_ID]'; - $azureNodePoolAutoscalingMinNodeCount = 0; - $azureNodePoolAutoscalingMaxNodeCount = 0; - $azureNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - $azureNodePoolId = '[AZURE_NODE_POOL_ID]'; - - create_azure_node_pool_sample( - $formattedParent, - $azureNodePoolVersion, - $azureNodePoolConfigSshConfigAuthorizedKey, - $azureNodePoolSubnetId, - $azureNodePoolAutoscalingMinNodeCount, - $azureNodePoolAutoscalingMaxNodeCount, - $azureNodePoolMaxPodsConstraintMaxPodsPerNode, - $azureNodePoolId - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php deleted file mode 100644 index 73cd6815764b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php +++ /dev/null @@ -1,96 +0,0 @@ -/locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - */ -function delete_azure_client_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new DeleteAzureClientRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->deleteAzureClient($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - - delete_azure_client_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php deleted file mode 100644 index 3db6efc56b76..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function delete_azure_cluster_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new DeleteAzureClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->deleteAzureCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - delete_azure_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php deleted file mode 100644 index 09682cc45c23..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - */ -function delete_azure_node_pool_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new DeleteAzureNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->deleteAzureNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]', - '[AZURE_NODE_POOL]' - ); - - delete_azure_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php deleted file mode 100644 index 3f8e1cfd3221..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function generate_azure_access_token_sample(string $formattedAzureCluster): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GenerateAzureAccessTokenRequest()) - ->setAzureCluster($formattedAzureCluster); - - // Call the API and handle any network failures. - try { - /** @var GenerateAzureAccessTokenResponse $response */ - $response = $azureClustersClient->generateAzureAccessToken($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAzureCluster = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - generate_azure_access_token_sample($formattedAzureCluster); -} -// [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php deleted file mode 100644 index d5c76b39d6ed..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - */ -function get_azure_client_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureClientRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureClient $response */ - $response = $azureClustersClient->getAzureClient($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - - get_azure_client_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php deleted file mode 100644 index 50e98138ea61..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function get_azure_cluster_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureCluster $response */ - $response = $azureClustersClient->getAzureCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - get_azure_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php deleted file mode 100644 index 320c19e99bbe..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - */ -function get_azure_node_pool_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureNodePool $response */ - $response = $azureClustersClient->getAzureNodePool($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]', - '[AZURE_NODE_POOL]' - ); - - get_azure_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php deleted file mode 100644 index ac90912218ec..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//azureServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureServerConfigName()} for help formatting this field. - */ -function get_azure_server_config_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureServerConfigRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureServerConfig $response */ - $response = $azureClustersClient->getAzureServerConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AzureClustersClient::azureServerConfigName('[PROJECT]', '[LOCATION]'); - - get_azure_server_config_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php deleted file mode 100644 index b9ae19b630d4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - */ -function list_azure_clients_sample(string $formattedParent): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new ListAzureClientsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $azureClustersClient->listAzureClients($request); - - /** @var AzureClient $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_azure_clients_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php deleted file mode 100644 index 084c07a5e087..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - */ -function list_azure_clusters_sample(string $formattedParent): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new ListAzureClustersRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $azureClustersClient->listAzureClusters($request); - - /** @var AzureCluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_azure_clusters_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php deleted file mode 100644 index 7678ac764a00..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php +++ /dev/null @@ -1,89 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function list_azure_node_pools_sample(string $formattedParent): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new ListAzureNodePoolsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $azureClustersClient->listAzureNodePools($request); - - /** @var AzureNodePool $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - list_azure_node_pools_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php deleted file mode 100644 index 284dffa01f94..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php +++ /dev/null @@ -1,185 +0,0 @@ -/resourceGroups/` - * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingPodAddressCidrBlocksElement The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingServiceAddressCidrBlocksElement The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creating a cluster. - * @param string $azureClusterControlPlaneVersion The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - */ -function update_azure_cluster_sample( - string $azureClusterAzureRegion, - string $azureClusterResourceGroupId, - string $azureClusterNetworkingVirtualNetworkId, - string $azureClusterNetworkingPodAddressCidrBlocksElement, - string $azureClusterNetworkingServiceAddressCidrBlocksElement, - string $azureClusterControlPlaneVersion, - string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterFleetProject -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureClusterNetworkingPodAddressCidrBlocks = [ - $azureClusterNetworkingPodAddressCidrBlocksElement, - ]; - $azureClusterNetworkingServiceAddressCidrBlocks = [ - $azureClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $azureClusterNetworking = (new AzureClusterNetworking()) - ->setVirtualNetworkId($azureClusterNetworkingVirtualNetworkId) - ->setPodAddressCidrBlocks($azureClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($azureClusterNetworkingServiceAddressCidrBlocks); - $azureClusterControlPlaneSshConfig = (new AzureSshConfig()) - ->setAuthorizedKey($azureClusterControlPlaneSshConfigAuthorizedKey); - $azureClusterControlPlane = (new AzureControlPlane()) - ->setVersion($azureClusterControlPlaneVersion) - ->setSshConfig($azureClusterControlPlaneSshConfig); - $azureClusterAuthorization = new AzureAuthorization(); - $azureClusterFleet = (new Fleet()) - ->setProject($azureClusterFleetProject); - $azureCluster = (new AzureCluster()) - ->setAzureRegion($azureClusterAzureRegion) - ->setResourceGroupId($azureClusterResourceGroupId) - ->setNetworking($azureClusterNetworking) - ->setControlPlane($azureClusterControlPlane) - ->setAuthorization($azureClusterAuthorization) - ->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAzureClusterRequest()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->updateAzureCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $azureClusterAzureRegion = '[AZURE_REGION]'; - $azureClusterResourceGroupId = '[RESOURCE_GROUP_ID]'; - $azureClusterNetworkingVirtualNetworkId = '[VIRTUAL_NETWORK_ID]'; - $azureClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $azureClusterControlPlaneVersion = '[VERSION]'; - $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureClusterFleetProject = '[PROJECT]'; - - update_azure_cluster_sample( - $azureClusterAzureRegion, - $azureClusterResourceGroupId, - $azureClusterNetworkingVirtualNetworkId, - $azureClusterNetworkingPodAddressCidrBlocksElement, - $azureClusterNetworkingServiceAddressCidrBlocksElement, - $azureClusterControlPlaneVersion, - $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterFleetProject - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php deleted file mode 100644 index 875782246004..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php +++ /dev/null @@ -1,133 +0,0 @@ -setAuthorizedKey($azureNodePoolConfigSshConfigAuthorizedKey); - $azureNodePoolConfig = (new AzureNodeConfig()) - ->setSshConfig($azureNodePoolConfigSshConfig); - $azureNodePoolAutoscaling = (new AzureNodePoolAutoscaling()) - ->setMinNodeCount($azureNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($azureNodePoolAutoscalingMaxNodeCount); - $azureNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($azureNodePoolMaxPodsConstraintMaxPodsPerNode); - $azureNodePool = (new AzureNodePool()) - ->setVersion($azureNodePoolVersion) - ->setConfig($azureNodePoolConfig) - ->setSubnetId($azureNodePoolSubnetId) - ->setAutoscaling($azureNodePoolAutoscaling) - ->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAzureNodePoolRequest()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->updateAzureNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureNodePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $azureNodePoolVersion = '[VERSION]'; - $azureNodePoolConfigSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureNodePoolSubnetId = '[SUBNET_ID]'; - $azureNodePoolAutoscalingMinNodeCount = 0; - $azureNodePoolAutoscalingMaxNodeCount = 0; - $azureNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - - update_azure_node_pool_sample( - $azureNodePoolVersion, - $azureNodePoolConfigSshConfigAuthorizedKey, - $azureNodePoolSubnetId, - $azureNodePoolAutoscalingMinNodeCount, - $azureNodePoolAutoscalingMaxNodeCount, - $azureNodePoolMaxPodsConstraintMaxPodsPerNode - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php deleted file mode 100644 index e8d698f9abe6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/AttachedClustersClient.php +++ /dev/null @@ -1,34 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/attached_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/attached_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/attached_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/attached_clusters_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * attached_cluster resource. - * - * @param string $project - * @param string $location - * @param string $attachedCluster - * - * @return string The formatted attached_cluster resource. - */ - public static function attachedClusterName(string $project, string $location, string $attachedCluster): string - { - return self::getPathTemplate('attachedCluster')->render([ - 'project' => $project, - 'location' => $location, - 'attached_cluster' => $attachedCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * attached_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted attached_server_config resource. - */ - public static function attachedServerConfigName(string $project, string $location): string - { - return self::getPathTemplate('attachedServerConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster} - * - attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AttachedClustersClient::createAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/create_attached_cluster.php - * - * @param CreateAttachedClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAttachedCluster(CreateAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AttachedClustersClient::deleteAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/delete_attached_cluster.php - * - * @param DeleteAttachedClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAttachedCluster(DeleteAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * The async variant is - * {@see AttachedClustersClient::generateAttachedClusterAgentTokenAsync()} . - * - * @example samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php - * - * @param GenerateAttachedClusterAgentTokenRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAttachedClusterAgentTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAttachedClusterAgentToken(GenerateAttachedClusterAgentTokenRequest $request, array $callOptions = []): GenerateAttachedClusterAgentTokenResponse - { - return $this->startApiCall('GenerateAttachedClusterAgentToken', $request, $callOptions)->wait(); - } - - /** - * Generates the install manifest to be installed on the target cluster. - * - * The async variant is - * {@see AttachedClustersClient::generateAttachedClusterInstallManifestAsync()} . - * - * @example samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php - * - * @param GenerateAttachedClusterInstallManifestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAttachedClusterInstallManifestResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAttachedClusterInstallManifest(GenerateAttachedClusterInstallManifestRequest $request, array $callOptions = []): GenerateAttachedClusterInstallManifestResponse - { - return $this->startApiCall('GenerateAttachedClusterInstallManifest', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. - * - * The async variant is {@see AttachedClustersClient::getAttachedClusterAsync()} . - * - * @example samples/V1/AttachedClustersClient/get_attached_cluster.php - * - * @param GetAttachedClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AttachedCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttachedCluster(GetAttachedClusterRequest $request, array $callOptions = []): AttachedCluster - { - return $this->startApiCall('GetAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Returns information, such as supported Kubernetes versions, on a given - * Google Cloud location. - * - * The async variant is - * {@see AttachedClustersClient::getAttachedServerConfigAsync()} . - * - * @example samples/V1/AttachedClustersClient/get_attached_server_config.php - * - * @param GetAttachedServerConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AttachedServerConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttachedServerConfig(GetAttachedServerConfigRequest $request, array $callOptions = []): AttachedServerConfig - { - return $this->startApiCall('GetAttachedServerConfig', $request, $callOptions)->wait(); - } - - /** - * Imports creates a new - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * by importing an existing Fleet Membership resource. - * - * Attached Clusters created before the introduction of the Anthos Multi-Cloud - * API can be imported through this method. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AttachedClustersClient::importAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/import_attached_cluster.php - * - * @param ImportAttachedClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importAttachedCluster(ImportAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources on a given Google Cloud project and region. - * - * The async variant is {@see AttachedClustersClient::listAttachedClustersAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/list_attached_clusters.php - * - * @param ListAttachedClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAttachedClusters(ListAttachedClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachedClusters', $request, $callOptions); - } - - /** - * Updates an - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * - * The async variant is {@see AttachedClustersClient::updateAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/update_attached_cluster.php - * - * @param UpdateAttachedClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAttachedCluster(UpdateAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAttachedCluster', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php deleted file mode 100644 index 0f7b6e65be6e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php +++ /dev/null @@ -1,802 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/aws_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/aws_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/aws_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/aws_clusters_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a aws_cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $awsCluster - * - * @return string The formatted aws_cluster resource. - */ - public static function awsClusterName(string $project, string $location, string $awsCluster): string - { - return self::getPathTemplate('awsCluster')->render([ - 'project' => $project, - 'location' => $location, - 'aws_cluster' => $awsCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * aws_node_pool resource. - * - * @param string $project - * @param string $location - * @param string $awsCluster - * @param string $awsNodePool - * - * @return string The formatted aws_node_pool resource. - */ - public static function awsNodePoolName(string $project, string $location, string $awsCluster, string $awsNodePool): string - { - return self::getPathTemplate('awsNodePool')->render([ - 'project' => $project, - 'location' => $location, - 'aws_cluster' => $awsCluster, - 'aws_node_pool' => $awsNodePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * aws_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted aws_server_config resource. - */ - public static function awsServerConfigName(string $project, string $location): string - { - return self::getPathTemplate('awsServerConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - awsCluster: projects/{project}/locations/{location}/awsClusters/{aws_cluster} - * - awsNodePool: projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool} - * - awsServerConfig: projects/{project}/locations/{location}/awsServerConfig - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::createAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/create_aws_cluster.php - * - * @param CreateAwsClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAwsCluster(CreateAwsClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], - * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::createAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/create_aws_node_pool.php - * - * @param CreateAwsNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAwsNodePool(CreateAwsNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAwsNodePool', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource. - * - * Fails if the cluster has one or more associated - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::deleteAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/delete_aws_cluster.php - * - * @param DeleteAwsClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAwsCluster(DeleteAwsClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::deleteAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/delete_aws_node_pool.php - * - * @param DeleteAwsNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAwsNodePool(DeleteAwsNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAwsNodePool', $request, $callOptions)->wait(); - } - - /** - * Generates a short-lived access token to authenticate to a given - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. - * - * The async variant is {@see AwsClustersClient::generateAwsAccessTokenAsync()} . - * - * @example samples/V1/AwsClustersClient/generate_aws_access_token.php - * - * @param GenerateAwsAccessTokenRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAwsAccessTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAwsAccessToken(GenerateAwsAccessTokenRequest $request, array $callOptions = []): GenerateAwsAccessTokenResponse - { - return $this->startApiCall('GenerateAwsAccessToken', $request, $callOptions)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * The async variant is - * {@see AwsClustersClient::generateAwsClusterAgentTokenAsync()} . - * - * @example samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php - * - * @param GenerateAwsClusterAgentTokenRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAwsClusterAgentTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAwsClusterAgentToken(GenerateAwsClusterAgentTokenRequest $request, array $callOptions = []): GenerateAwsClusterAgentTokenResponse - { - return $this->startApiCall('GenerateAwsClusterAgentToken', $request, $callOptions)->wait(); - } - - /** - * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource. - * - * The async variant is {@see AwsClustersClient::getAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_cluster.php - * - * @param GetAwsClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AwsCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsCluster(GetAwsClusterRequest $request, array $callOptions = []): AwsCluster - { - return $this->startApiCall('GetAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * The async variant is {@see AwsClustersClient::getAwsJsonWebKeysAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_json_web_keys.php - * - * @param GetAwsJsonWebKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AwsJsonWebKeys - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsJsonWebKeys(GetAwsJsonWebKeysRequest $request, array $callOptions = []): AwsJsonWebKeys - { - return $this->startApiCall('GetAwsJsonWebKeys', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. - * - * The async variant is {@see AwsClustersClient::getAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_node_pool.php - * - * @param GetAwsNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AwsNodePool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsNodePool(GetAwsNodePoolRequest $request, array $callOptions = []): AwsNodePool - { - return $this->startApiCall('GetAwsNodePool', $request, $callOptions)->wait(); - } - - /** - * Gets the OIDC discovery document for the cluster. - * See the - * [OpenID Connect Discovery 1.0 - * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) - * for details. - * - * The async variant is {@see AwsClustersClient::getAwsOpenIdConfigAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_open_id_config.php - * - * @param GetAwsOpenIdConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AwsOpenIdConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsOpenIdConfig(GetAwsOpenIdConfigRequest $request, array $callOptions = []): AwsOpenIdConfig - { - return $this->startApiCall('GetAwsOpenIdConfig', $request, $callOptions)->wait(); - } - - /** - * Returns information, such as supported AWS regions and Kubernetes - * versions, on a given Google Cloud location. - * - * The async variant is {@see AwsClustersClient::getAwsServerConfigAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_server_config.php - * - * @param GetAwsServerConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AwsServerConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsServerConfig(GetAwsServerConfigRequest $request, array $callOptions = []): AwsServerConfig - { - return $this->startApiCall('GetAwsServerConfig', $request, $callOptions)->wait(); - } - - /** - * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * on a given Google Cloud project and region. - * - * The async variant is {@see AwsClustersClient::listAwsClustersAsync()} . - * - * @example samples/V1/AwsClustersClient/list_aws_clusters.php - * - * @param ListAwsClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAwsClusters(ListAwsClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAwsClusters', $request, $callOptions); - } - - /** - * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources on a given - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * The async variant is {@see AwsClustersClient::listAwsNodePoolsAsync()} . - * - * @example samples/V1/AwsClustersClient/list_aws_node_pools.php - * - * @param ListAwsNodePoolsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAwsNodePools(ListAwsNodePoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAwsNodePools', $request, $callOptions); - } - - /** - * Rolls back a previously aborted or failed - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. - * Makes no changes if the last update request successfully finished. - * If an update request is in progress, you cannot rollback the update. - * You must first cancel or let it finish unsuccessfully before you can - * rollback. - * - * The async variant is {@see AwsClustersClient::rollbackAwsNodePoolUpdateAsync()} - * . - * - * @example samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php - * - * @param RollbackAwsNodePoolUpdateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rollbackAwsNodePoolUpdate(RollbackAwsNodePoolUpdateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RollbackAwsNodePoolUpdate', $request, $callOptions)->wait(); - } - - /** - * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * The async variant is {@see AwsClustersClient::updateAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/update_aws_cluster.php - * - * @param UpdateAwsClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAwsCluster(UpdateAwsClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * - * The async variant is {@see AwsClustersClient::updateAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/update_aws_node_pool.php - * - * @param UpdateAwsNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAwsNodePool(UpdateAwsNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAwsNodePool', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php deleted file mode 100644 index 213ededb0949..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php +++ /dev/null @@ -1,922 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/azure_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/azure_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/azure_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/azure_clusters_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a azure_client - * resource. - * - * @param string $project - * @param string $location - * @param string $azureClient - * - * @return string The formatted azure_client resource. - */ - public static function azureClientName(string $project, string $location, string $azureClient): string - { - return self::getPathTemplate('azureClient')->render([ - 'project' => $project, - 'location' => $location, - 'azure_client' => $azureClient, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_cluster resource. - * - * @param string $project - * @param string $location - * @param string $azureCluster - * - * @return string The formatted azure_cluster resource. - */ - public static function azureClusterName(string $project, string $location, string $azureCluster): string - { - return self::getPathTemplate('azureCluster')->render([ - 'project' => $project, - 'location' => $location, - 'azure_cluster' => $azureCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_node_pool resource. - * - * @param string $project - * @param string $location - * @param string $azureCluster - * @param string $azureNodePool - * - * @return string The formatted azure_node_pool resource. - */ - public static function azureNodePoolName(string $project, string $location, string $azureCluster, string $azureNodePool): string - { - return self::getPathTemplate('azureNodePool')->render([ - 'project' => $project, - 'location' => $location, - 'azure_cluster' => $azureCluster, - 'azure_node_pool' => $azureNodePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted azure_server_config resource. - */ - public static function azureServerConfigName(string $project, string $location): string - { - return self::getPathTemplate('azureServerConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - azureClient: projects/{project}/locations/{location}/azureClients/{azure_client} - * - azureCluster: projects/{project}/locations/{location}/azureClusters/{azure_cluster} - * - azureNodePool: projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool} - * - azureServerConfig: projects/{project}/locations/{location}/azureServerConfig - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource on a given Google Cloud project and region. - * - * `AzureClient` resources hold client authentication - * information needed by the Anthos Multicloud API to manage Azure resources - * on your Azure subscription on your behalf. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::createAzureClientAsync()} . - * - * @example samples/V1/AzureClustersClient/create_azure_client.php - * - * @param CreateAzureClientRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAzureClient(CreateAzureClientRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAzureClient', $request, $callOptions)->wait(); - } - - /** - * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::createAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/create_azure_cluster.php - * - * @param CreateAzureClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAzureCluster(CreateAzureClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], - * attached to a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::createAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/create_azure_node_pool.php - * - * @param CreateAzureNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAzureNodePool(CreateAzureNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAzureNodePool', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource. - * - * If the client is used by one or more clusters, deletion will - * fail and a `FAILED_PRECONDITION` error will be returned. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::deleteAzureClientAsync()} . - * - * @example samples/V1/AzureClustersClient/delete_azure_client.php - * - * @param DeleteAzureClientRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAzureClient(DeleteAzureClientRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAzureClient', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * Fails if the cluster has one or more associated - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::deleteAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/delete_azure_cluster.php - * - * @param DeleteAzureClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAzureCluster(DeleteAzureClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::deleteAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/delete_azure_node_pool.php - * - * @param DeleteAzureNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAzureNodePool(DeleteAzureNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAzureNodePool', $request, $callOptions)->wait(); - } - - /** - * Generates a short-lived access token to authenticate to a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * The async variant is {@see AzureClustersClient::generateAzureAccessTokenAsync()} - * . - * - * @example samples/V1/AzureClustersClient/generate_azure_access_token.php - * - * @param GenerateAzureAccessTokenRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAzureAccessTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAzureAccessToken(GenerateAzureAccessTokenRequest $request, array $callOptions = []): GenerateAzureAccessTokenResponse - { - return $this->startApiCall('GenerateAzureAccessToken', $request, $callOptions)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * The async variant is - * {@see AzureClustersClient::generateAzureClusterAgentTokenAsync()} . - * - * @example samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php - * - * @param GenerateAzureClusterAgentTokenRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAzureClusterAgentTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAzureClusterAgentToken(GenerateAzureClusterAgentTokenRequest $request, array $callOptions = []): GenerateAzureClusterAgentTokenResponse - { - return $this->startApiCall('GenerateAzureClusterAgentToken', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. - * - * The async variant is {@see AzureClustersClient::getAzureClientAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_client.php - * - * @param GetAzureClientRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AzureClient - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureClient(GetAzureClientRequest $request, array $callOptions = []): AzureClient - { - return $this->startApiCall('GetAzureClient', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * The async variant is {@see AzureClustersClient::getAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_cluster.php - * - * @param GetAzureClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AzureCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureCluster(GetAzureClusterRequest $request, array $callOptions = []): AzureCluster - { - return $this->startApiCall('GetAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * The async variant is {@see AzureClustersClient::getAzureJsonWebKeysAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_json_web_keys.php - * - * @param GetAzureJsonWebKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AzureJsonWebKeys - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureJsonWebKeys(GetAzureJsonWebKeysRequest $request, array $callOptions = []): AzureJsonWebKeys - { - return $this->startApiCall('GetAzureJsonWebKeys', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - * - * The async variant is {@see AzureClustersClient::getAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_node_pool.php - * - * @param GetAzureNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AzureNodePool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureNodePool(GetAzureNodePoolRequest $request, array $callOptions = []): AzureNodePool - { - return $this->startApiCall('GetAzureNodePool', $request, $callOptions)->wait(); - } - - /** - * Gets the OIDC discovery document for the cluster. - * See the - * [OpenID Connect Discovery 1.0 - * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) - * for details. - * - * The async variant is {@see AzureClustersClient::getAzureOpenIdConfigAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_open_id_config.php - * - * @param GetAzureOpenIdConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AzureOpenIdConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureOpenIdConfig(GetAzureOpenIdConfigRequest $request, array $callOptions = []): AzureOpenIdConfig - { - return $this->startApiCall('GetAzureOpenIdConfig', $request, $callOptions)->wait(); - } - - /** - * Returns information, such as supported Azure regions and Kubernetes - * versions, on a given Google Cloud location. - * - * The async variant is {@see AzureClustersClient::getAzureServerConfigAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_server_config.php - * - * @param GetAzureServerConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AzureServerConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureServerConfig(GetAzureServerConfigRequest $request, array $callOptions = []): AzureServerConfig - { - return $this->startApiCall('GetAzureServerConfig', $request, $callOptions)->wait(); - } - - /** - * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources on a given Google Cloud project and region. - * - * The async variant is {@see AzureClustersClient::listAzureClientsAsync()} . - * - * @example samples/V1/AzureClustersClient/list_azure_clients.php - * - * @param ListAzureClientsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAzureClients(ListAzureClientsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAzureClients', $request, $callOptions); - } - - /** - * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources on a given Google Cloud project and region. - * - * The async variant is {@see AzureClustersClient::listAzureClustersAsync()} . - * - * @example samples/V1/AzureClustersClient/list_azure_clusters.php - * - * @param ListAzureClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAzureClusters(ListAzureClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAzureClusters', $request, $callOptions); - } - - /** - * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources on a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * The async variant is {@see AzureClustersClient::listAzureNodePoolsAsync()} . - * - * @example samples/V1/AzureClustersClient/list_azure_node_pools.php - * - * @param ListAzureNodePoolsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAzureNodePools(ListAzureNodePoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAzureNodePools', $request, $callOptions); - } - - /** - * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * The async variant is {@see AzureClustersClient::updateAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/update_azure_cluster.php - * - * @param UpdateAzureClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAzureCluster(UpdateAzureClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * - * The async variant is {@see AzureClustersClient::updateAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/update_azure_node_pool.php - * - * @param UpdateAzureNodePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAzureNodePool(UpdateAzureNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAzureNodePool', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php deleted file mode 100644 index a8650ccad16e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AttachedClustersGapicClient.php +++ /dev/null @@ -1,1123 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $attachedCluster = new AttachedCluster(); - * $attachedClusterId = 'attached_cluster_id'; - * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'createAttachedCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient}. - */ -class AttachedClustersGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AttachedClusters'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $attachedClusterNameTemplate; - - private static $attachedServerConfigNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/attached_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/attached_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/attached_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/attached_clusters_rest_client_config.php', - ], - ], - ]; - } - - private static function getAttachedClusterNameTemplate() - { - if (self::$attachedClusterNameTemplate == null) { - self::$attachedClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/attachedClusters/{attached_cluster}'); - } - - return self::$attachedClusterNameTemplate; - } - - private static function getAttachedServerConfigNameTemplate() - { - if (self::$attachedServerConfigNameTemplate == null) { - self::$attachedServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/attachedServerConfig'); - } - - return self::$attachedServerConfigNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'attachedCluster' => self::getAttachedClusterNameTemplate(), - 'attachedServerConfig' => self::getAttachedServerConfigNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * attached_cluster resource. - * - * @param string $project - * @param string $location - * @param string $attachedCluster - * - * @return string The formatted attached_cluster resource. - */ - public static function attachedClusterName($project, $location, $attachedCluster) - { - return self::getAttachedClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'attached_cluster' => $attachedCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * attached_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted attached_server_config resource. - */ - public static function attachedServerConfigName($project, $location) - { - return self::getAttachedServerConfigNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster} - * - attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * $attachedCluster = new AttachedCluster(); - * $attachedClusterId = 'attached_cluster_id'; - * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'createAttachedCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param AttachedCluster $attachedCluster Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually create the cluster. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAttachedCluster($parent, $attachedCluster, $attachedClusterId, array $optionalArgs = []) - { - $request = new CreateAttachedClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAttachedCluster($attachedCluster); - $request->setAttachedClusterId($attachedClusterId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedName = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - * $operationResponse = $attachedClustersClient->deleteAttachedCluster($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $attachedClustersClient->deleteAttachedCluster($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'deleteAttachedCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @type bool $allowMissing - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * - * Useful for idempotent deletion. - * @type bool $ignoreErrors - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * @type string $etag - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAttachedCluster($name, array $optionalArgs = []) - { - $request = new DeleteAttachedClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['ignoreErrors'])) { - $request->setIgnoreErrors($optionalArgs['ignoreErrors']); - } - - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedAttachedCluster = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - * $subjectToken = 'subject_token'; - * $subjectTokenType = 'subject_token_type'; - * $version = 'version'; - * $response = $attachedClustersClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $attachedCluster Required. - * @param string $subjectToken Required. - * @param string $subjectTokenType Required. - * @param string $version Required. - * @param array $optionalArgs { - * Optional. - * - * @type string $grantType - * Optional. - * @type string $audience - * Optional. - * @type string $scope - * Optional. - * @type string $requestedTokenType - * Optional. - * @type string $options - * Optional. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAttachedClusterAgentToken($attachedCluster, $subjectToken, $subjectTokenType, $version, array $optionalArgs = []) - { - $request = new GenerateAttachedClusterAgentTokenRequest(); - $requestParamHeaders = []; - $request->setAttachedCluster($attachedCluster); - $request->setSubjectToken($subjectToken); - $request->setSubjectTokenType($subjectTokenType); - $request->setVersion($version); - $requestParamHeaders['attached_cluster'] = $attachedCluster; - if (isset($optionalArgs['grantType'])) { - $request->setGrantType($optionalArgs['grantType']); - } - - if (isset($optionalArgs['audience'])) { - $request->setAudience($optionalArgs['audience']); - } - - if (isset($optionalArgs['scope'])) { - $request->setScope($optionalArgs['scope']); - } - - if (isset($optionalArgs['requestedTokenType'])) { - $request->setRequestedTokenType($optionalArgs['requestedTokenType']); - } - - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAttachedClusterAgentToken', GenerateAttachedClusterAgentTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Generates the install manifest to be installed on the target cluster. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * $attachedClusterId = 'attached_cluster_id'; - * $platformVersion = 'platform_version'; - * $response = $attachedClustersClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param string $attachedClusterId Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * - * Membership names are formatted as - * `projects//locations//memberships/`. - * @param string $platformVersion Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @param array $optionalArgs { - * Optional. - * - * @type AttachedProxyConfig $proxyConfig - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAttachedClusterInstallManifest($parent, $attachedClusterId, $platformVersion, array $optionalArgs = []) - { - $request = new GenerateAttachedClusterInstallManifestRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAttachedClusterId($attachedClusterId); - $request->setPlatformVersion($platformVersion); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['proxyConfig'])) { - $request->setProxyConfig($optionalArgs['proxyConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAttachedClusterInstallManifest', GenerateAttachedClusterInstallManifestResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Describes a specific - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedName = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - * $response = $attachedClustersClient->getAttachedCluster($formattedName); - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster - * - * @throws ApiException if the remote call fails - */ - public function getAttachedCluster($name, array $optionalArgs = []) - { - $request = new GetAttachedClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAttachedCluster', AttachedCluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns information, such as supported Kubernetes versions, on a given - * Google Cloud location. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedName = $attachedClustersClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - * $response = $attachedClustersClient->getAttachedServerConfig($formattedName); - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig - * - * @throws ApiException if the remote call fails - */ - public function getAttachedServerConfig($name, array $optionalArgs = []) - { - $request = new GetAttachedServerConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAttachedServerConfig', AttachedServerConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports creates a new - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * by importing an existing Fleet Membership resource. - * - * Attached Clusters created before the introduction of the Anthos Multi-Cloud - * API can be imported through this method. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * $fleetMembership = 'fleet_membership'; - * $platformVersion = 'platform_version'; - * $distribution = 'distribution'; - * $operationResponse = $attachedClustersClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $attachedClustersClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'importAttachedCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param string $fleetMembership Required. The name of the fleet membership resource to import. - * @param string $platformVersion Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @param string $distribution Required. The Kubernetes distribution of the underlying attached cluster. - * - * Supported values: ["eks", "aks"]. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually import the cluster. - * @type AttachedProxyConfig $proxyConfig - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importAttachedCluster($parent, $fleetMembership, $platformVersion, $distribution, array $optionalArgs = []) - { - $request = new ImportAttachedClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFleetMembership($fleetMembership); - $request->setPlatformVersion($platformVersion); - $request->setDistribution($distribution); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - if (isset($optionalArgs['proxyConfig'])) { - $request->setProxyConfig($optionalArgs['proxyConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources on a given Google Cloud project and region. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $attachedClustersClient->listAttachedClusters($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $attachedClustersClient->listAttachedClusters($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAttachedClusters($parent, array $optionalArgs = []) - { - $request = new ListAttachedClustersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAttachedClusters', $optionalArgs, ListAttachedClustersResponse::class, $request); - } - - /** - * Updates an - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * - * Sample code: - * ``` - * $attachedClustersClient = new AttachedClustersClient(); - * try { - * $attachedCluster = new AttachedCluster(); - * $updateMask = new FieldMask(); - * $operationResponse = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'updateAttachedCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $attachedClustersClient->close(); - * } - * ``` - * - * @param AttachedCluster $attachedCluster Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually update the cluster. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAttachedCluster($attachedCluster, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAttachedClusterRequest(); - $requestParamHeaders = []; - $request->setAttachedCluster($attachedCluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['attached_cluster.name'] = $attachedCluster->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAttachedCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php deleted file mode 100644 index 19eb14547a64..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AwsClustersGapicClient.php +++ /dev/null @@ -1,1666 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $awsCluster = new AwsCluster(); - * $awsClusterId = 'aws_cluster_id'; - * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'createAwsCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\GkeMultiCloud\V1\Client\AwsClustersClient}. - */ -class AwsClustersGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AwsClusters'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $awsClusterNameTemplate; - - private static $awsNodePoolNameTemplate; - - private static $awsServerConfigNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/aws_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/aws_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/aws_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/aws_clusters_rest_client_config.php', - ], - ], - ]; - } - - private static function getAwsClusterNameTemplate() - { - if (self::$awsClusterNameTemplate == null) { - self::$awsClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/awsClusters/{aws_cluster}'); - } - - return self::$awsClusterNameTemplate; - } - - private static function getAwsNodePoolNameTemplate() - { - if (self::$awsNodePoolNameTemplate == null) { - self::$awsNodePoolNameTemplate = new PathTemplate('projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}'); - } - - return self::$awsNodePoolNameTemplate; - } - - private static function getAwsServerConfigNameTemplate() - { - if (self::$awsServerConfigNameTemplate == null) { - self::$awsServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/awsServerConfig'); - } - - return self::$awsServerConfigNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'awsCluster' => self::getAwsClusterNameTemplate(), - 'awsNodePool' => self::getAwsNodePoolNameTemplate(), - 'awsServerConfig' => self::getAwsServerConfigNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a aws_cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $awsCluster - * - * @return string The formatted aws_cluster resource. - */ - public static function awsClusterName($project, $location, $awsCluster) - { - return self::getAwsClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'aws_cluster' => $awsCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * aws_node_pool resource. - * - * @param string $project - * @param string $location - * @param string $awsCluster - * @param string $awsNodePool - * - * @return string The formatted aws_node_pool resource. - */ - public static function awsNodePoolName($project, $location, $awsCluster, $awsNodePool) - { - return self::getAwsNodePoolNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'aws_cluster' => $awsCluster, - 'aws_node_pool' => $awsNodePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * aws_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted aws_server_config resource. - */ - public static function awsServerConfigName($project, $location) - { - return self::getAwsServerConfigNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - awsCluster: projects/{project}/locations/{location}/awsClusters/{aws_cluster} - * - awsNodePool: projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool} - * - awsServerConfig: projects/{project}/locations/{location}/awsServerConfig - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedParent = $awsClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * $awsCluster = new AwsCluster(); - * $awsClusterId = 'aws_cluster_id'; - * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'createAwsCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param AwsCluster $awsCluster Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually create the cluster. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAwsCluster($parent, $awsCluster, $awsClusterId, array $optionalArgs = []) - { - $request = new CreateAwsClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAwsCluster($awsCluster); - $request->setAwsClusterId($awsClusterId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAwsCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], - * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedParent = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $awsNodePool = new AwsNodePool(); - * $awsNodePoolId = 'aws_node_pool_id'; - * $operationResponse = $awsClustersClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'createAwsNodePool'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param AwsNodePool $awsNodePool Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually create the node - * pool. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAwsNodePool($parent, $awsNodePool, $awsNodePoolId, array $optionalArgs = []) - { - $request = new CreateAwsNodePoolRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAwsNodePool($awsNodePool); - $request->setAwsNodePoolId($awsNodePoolId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAwsNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource. - * - * Fails if the cluster has one or more associated - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedName = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $operationResponse = $awsClustersClient->deleteAwsCluster($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->deleteAwsCluster($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'deleteAwsCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @type bool $allowMissing - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * - * Useful for idempotent deletion. - * @type bool $ignoreErrors - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * @type string $etag - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAwsCluster($name, array $optionalArgs = []) - { - $request = new DeleteAwsClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['ignoreErrors'])) { - $request->setIgnoreErrors($optionalArgs['ignoreErrors']); - } - - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAwsCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - * $operationResponse = $awsClustersClient->deleteAwsNodePool($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->deleteAwsNodePool($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'deleteAwsNodePool'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually delete the node - * pool. - * @type bool $allowMissing - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * - * Useful for idempotent deletion. - * @type bool $ignoreErrors - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * @type string $etag - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAwsNodePool($name, array $optionalArgs = []) - { - $request = new DeleteAwsNodePoolRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['ignoreErrors'])) { - $request->setIgnoreErrors($optionalArgs['ignoreErrors']); - } - - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAwsNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Generates a short-lived access token to authenticate to a given - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $response = $awsClustersClient->generateAwsAccessToken($formattedAwsCluster); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $awsCluster Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAwsAccessToken($awsCluster, array $optionalArgs = []) - { - $request = new GenerateAwsAccessTokenRequest(); - $requestParamHeaders = []; - $request->setAwsCluster($awsCluster); - $requestParamHeaders['aws_cluster'] = $awsCluster; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAwsAccessToken', GenerateAwsAccessTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $subjectToken = 'subject_token'; - * $subjectTokenType = 'subject_token_type'; - * $version = 'version'; - * $response = $awsClustersClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $awsCluster Required. - * @param string $subjectToken Required. - * @param string $subjectTokenType Required. - * @param string $version Required. - * @param array $optionalArgs { - * Optional. - * - * @type string $nodePoolId - * Optional. - * @type string $grantType - * Optional. - * @type string $audience - * Optional. - * @type string $scope - * Optional. - * @type string $requestedTokenType - * Optional. - * @type string $options - * Optional. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAwsClusterAgentToken($awsCluster, $subjectToken, $subjectTokenType, $version, array $optionalArgs = []) - { - $request = new GenerateAwsClusterAgentTokenRequest(); - $requestParamHeaders = []; - $request->setAwsCluster($awsCluster); - $request->setSubjectToken($subjectToken); - $request->setSubjectTokenType($subjectTokenType); - $request->setVersion($version); - $requestParamHeaders['aws_cluster'] = $awsCluster; - if (isset($optionalArgs['nodePoolId'])) { - $request->setNodePoolId($optionalArgs['nodePoolId']); - } - - if (isset($optionalArgs['grantType'])) { - $request->setGrantType($optionalArgs['grantType']); - } - - if (isset($optionalArgs['audience'])) { - $request->setAudience($optionalArgs['audience']); - } - - if (isset($optionalArgs['scope'])) { - $request->setScope($optionalArgs['scope']); - } - - if (isset($optionalArgs['requestedTokenType'])) { - $request->setRequestedTokenType($optionalArgs['requestedTokenType']); - } - - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAwsClusterAgentToken', GenerateAwsClusterAgentTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedName = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $response = $awsClustersClient->getAwsCluster($formattedName); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster - * - * @throws ApiException if the remote call fails - */ - public function getAwsCluster($name, array $optionalArgs = []) - { - $request = new GetAwsClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAwsCluster', AwsCluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $response = $awsClustersClient->getAwsJsonWebKeys($formattedAwsCluster); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $awsCluster Required. The AwsCluster, which owns the JsonWebKeys. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys - * - * @throws ApiException if the remote call fails - */ - public function getAwsJsonWebKeys($awsCluster, array $optionalArgs = []) - { - $request = new GetAwsJsonWebKeysRequest(); - $requestParamHeaders = []; - $request->setAwsCluster($awsCluster); - $requestParamHeaders['aws_cluster'] = $awsCluster; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAwsJsonWebKeys', AwsJsonWebKeys::class, $optionalArgs, $request)->wait(); - } - - /** - * Describes a specific - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - * $response = $awsClustersClient->getAwsNodePool($formattedName); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool - * - * @throws ApiException if the remote call fails - */ - public function getAwsNodePool($name, array $optionalArgs = []) - { - $request = new GetAwsNodePoolRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAwsNodePool', AwsNodePool::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the OIDC discovery document for the cluster. - * See the - * [OpenID Connect Discovery 1.0 - * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) - * for details. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedAwsCluster = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * $response = $awsClustersClient->getAwsOpenIdConfig($formattedAwsCluster); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $awsCluster Required. The AwsCluster, which owns the OIDC discovery document. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig - * - * @throws ApiException if the remote call fails - */ - public function getAwsOpenIdConfig($awsCluster, array $optionalArgs = []) - { - $request = new GetAwsOpenIdConfigRequest(); - $requestParamHeaders = []; - $request->setAwsCluster($awsCluster); - $requestParamHeaders['aws_cluster'] = $awsCluster; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAwsOpenIdConfig', AwsOpenIdConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns information, such as supported AWS regions and Kubernetes - * versions, on a given Google Cloud location. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedName = $awsClustersClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); - * $response = $awsClustersClient->getAwsServerConfig($formattedName); - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AwsServerConfig - * - * @throws ApiException if the remote call fails - */ - public function getAwsServerConfig($name, array $optionalArgs = []) - { - $request = new GetAwsServerConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAwsServerConfig', AwsServerConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * on a given Google Cloud project and region. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedParent = $awsClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $awsClustersClient->listAwsClusters($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $awsClustersClient->listAwsClusters($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAwsClusters($parent, array $optionalArgs = []) - { - $request = new ListAwsClustersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAwsClusters', $optionalArgs, ListAwsClustersResponse::class, $request); - } - - /** - * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources on a given - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedParent = $awsClustersClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - * // Iterate over pages of elements - * $pagedResponse = $awsClustersClient->listAwsNodePools($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $awsClustersClient->listAwsNodePools($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAwsNodePools($parent, array $optionalArgs = []) - { - $request = new ListAwsNodePoolsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAwsNodePools', $optionalArgs, ListAwsNodePoolsResponse::class, $request); - } - - /** - * Rolls back a previously aborted or failed - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. - * Makes no changes if the last update request successfully finished. - * If an update request is in progress, you cannot rollback the update. - * You must first cancel or let it finish unsuccessfully before you can - * rollback. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $formattedName = $awsClustersClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - * $operationResponse = $awsClustersClient->rollbackAwsNodePoolUpdate($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->rollbackAwsNodePoolUpdate($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'rollbackAwsNodePoolUpdate'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * rollback. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $respectPdb - * Optional. Option for rollback to ignore the PodDisruptionBudget when - * draining the node pool nodes. Default value is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function rollbackAwsNodePoolUpdate($name, array $optionalArgs = []) - { - $request = new RollbackAwsNodePoolUpdateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['respectPdb'])) { - $request->setRespectPdb($optionalArgs['respectPdb']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RollbackAwsNodePoolUpdate', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $awsCluster = new AwsCluster(); - * $updateMask = new FieldMask(); - * $operationResponse = $awsClustersClient->updateAwsCluster($awsCluster, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->updateAwsCluster($awsCluster, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'updateAwsCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually update the cluster. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAwsCluster($awsCluster, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAwsClusterRequest(); - $requestParamHeaders = []; - $request->setAwsCluster($awsCluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['aws_cluster.name'] = $awsCluster->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAwsCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * - * Sample code: - * ``` - * $awsClustersClient = new AwsClustersClient(); - * try { - * $awsNodePool = new AwsNodePool(); - * $updateMask = new FieldMask(); - * $operationResponse = $awsClustersClient->updateAwsNodePool($awsNodePool, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $awsClustersClient->updateAwsNodePool($awsNodePool, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $awsClustersClient->resumeOperation($operationName, 'updateAwsNodePool'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $awsClustersClient->close(); - * } - * ``` - * - * @param AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but don't actually update the node pool. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAwsNodePool($awsNodePool, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAwsNodePoolRequest(); - $requestParamHeaders = []; - $request->setAwsNodePool($awsNodePool); - $request->setUpdateMask($updateMask); - $requestParamHeaders['aws_node_pool.name'] = $awsNodePool->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAwsNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php deleted file mode 100644 index 396cd65f9fd1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Gapic/AzureClustersGapicClient.php +++ /dev/null @@ -1,1890 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $azureClient = new AzureClient(); - * $azureClientId = 'azure_client_id'; - * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureClient'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\GkeMultiCloud\V1\Client\AzureClustersClient}. - */ -class AzureClustersGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AzureClusters'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $azureClientNameTemplate; - - private static $azureClusterNameTemplate; - - private static $azureNodePoolNameTemplate; - - private static $azureServerConfigNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/azure_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/azure_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/azure_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/azure_clusters_rest_client_config.php', - ], - ], - ]; - } - - private static function getAzureClientNameTemplate() - { - if (self::$azureClientNameTemplate == null) { - self::$azureClientNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureClients/{azure_client}'); - } - - return self::$azureClientNameTemplate; - } - - private static function getAzureClusterNameTemplate() - { - if (self::$azureClusterNameTemplate == null) { - self::$azureClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureClusters/{azure_cluster}'); - } - - return self::$azureClusterNameTemplate; - } - - private static function getAzureNodePoolNameTemplate() - { - if (self::$azureNodePoolNameTemplate == null) { - self::$azureNodePoolNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}'); - } - - return self::$azureNodePoolNameTemplate; - } - - private static function getAzureServerConfigNameTemplate() - { - if (self::$azureServerConfigNameTemplate == null) { - self::$azureServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/azureServerConfig'); - } - - return self::$azureServerConfigNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'azureClient' => self::getAzureClientNameTemplate(), - 'azureCluster' => self::getAzureClusterNameTemplate(), - 'azureNodePool' => self::getAzureNodePoolNameTemplate(), - 'azureServerConfig' => self::getAzureServerConfigNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a azure_client - * resource. - * - * @param string $project - * @param string $location - * @param string $azureClient - * - * @return string The formatted azure_client resource. - */ - public static function azureClientName($project, $location, $azureClient) - { - return self::getAzureClientNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'azure_client' => $azureClient, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_cluster resource. - * - * @param string $project - * @param string $location - * @param string $azureCluster - * - * @return string The formatted azure_cluster resource. - */ - public static function azureClusterName($project, $location, $azureCluster) - { - return self::getAzureClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'azure_cluster' => $azureCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_node_pool resource. - * - * @param string $project - * @param string $location - * @param string $azureCluster - * @param string $azureNodePool - * - * @return string The formatted azure_node_pool resource. - */ - public static function azureNodePoolName($project, $location, $azureCluster, $azureNodePool) - { - return self::getAzureNodePoolNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'azure_cluster' => $azureCluster, - 'azure_node_pool' => $azureNodePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted azure_server_config resource. - */ - public static function azureServerConfigName($project, $location) - { - return self::getAzureServerConfigNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - azureClient: projects/{project}/locations/{location}/azureClients/{azure_client} - * - azureCluster: projects/{project}/locations/{location}/azureClusters/{azure_cluster} - * - azureNodePool: projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool} - * - azureServerConfig: projects/{project}/locations/{location}/azureServerConfig - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource on a given Google Cloud project and region. - * - * `AzureClient` resources hold client authentication - * information needed by the Anthos Multicloud API to manage Azure resources - * on your Azure subscription on your behalf. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * $azureClient = new AzureClient(); - * $azureClientId = 'azure_client_id'; - * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->createAzureClient($formattedParent, $azureClient, $azureClientId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureClient'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param AzureClient $azureClient Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually create the client. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAzureClient($parent, $azureClient, $azureClientId, array $optionalArgs = []) - { - $request = new CreateAzureClientRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAzureClient($azureClient); - $request->setAzureClientId($azureClientId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAzureClient', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * $azureCluster = new AzureCluster(); - * $azureClusterId = 'azure_cluster_id'; - * $operationResponse = $azureClustersClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param AzureCluster $azureCluster Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually create the cluster. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAzureCluster($parent, $azureCluster, $azureClusterId, array $optionalArgs = []) - { - $request = new CreateAzureClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAzureCluster($azureCluster); - $request->setAzureClusterId($azureClusterId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAzureCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], - * attached to a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedParent = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $azureNodePool = new AzureNodePool(); - * $azureNodePoolId = 'azure_node_pool_id'; - * $operationResponse = $azureClustersClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'createAzureNodePool'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param AzureNodePool $azureNodePool Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually create the node - * pool. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAzureNodePool($parent, $azureNodePool, $azureNodePoolId, array $optionalArgs = []) - { - $request = new CreateAzureNodePoolRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAzureNodePool($azureNodePool); - $request->setAzureNodePoolId($azureNodePoolId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAzureNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource. - * - * If the client is used by one or more clusters, deletion will - * fail and a `FAILED_PRECONDITION` error will be returned. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - * $operationResponse = $azureClustersClient->deleteAzureClient($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->deleteAzureClient($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'deleteAzureClient'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $allowMissing - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * - * Useful for idempotent deletion. - * @type bool $validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAzureClient($name, array $optionalArgs = []) - { - $request = new DeleteAzureClientRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAzureClient', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * Fails if the cluster has one or more associated - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $operationResponse = $azureClustersClient->deleteAzureCluster($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->deleteAzureCluster($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'deleteAzureCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $allowMissing - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * - * Useful for idempotent deletion. - * @type bool $validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @type string $etag - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAzureCluster($name, array $optionalArgs = []) - { - $request = new DeleteAzureClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAzureCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - * $operationResponse = $azureClustersClient->deleteAzureNodePool($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->deleteAzureNodePool($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'deleteAzureNodePool'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually delete the node - * pool. - * @type bool $allowMissing - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * - * Useful for idempotent deletion. - * @type string $etag - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAzureNodePool($name, array $optionalArgs = []) - { - $request = new DeleteAzureNodePoolRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAzureNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Generates a short-lived access token to authenticate to a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $response = $azureClustersClient->generateAzureAccessToken($formattedAzureCluster); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $azureCluster Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAzureAccessToken($azureCluster, array $optionalArgs = []) - { - $request = new GenerateAzureAccessTokenRequest(); - $requestParamHeaders = []; - $request->setAzureCluster($azureCluster); - $requestParamHeaders['azure_cluster'] = $azureCluster; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAzureAccessToken', GenerateAzureAccessTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $subjectToken = 'subject_token'; - * $subjectTokenType = 'subject_token_type'; - * $version = 'version'; - * $response = $azureClustersClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $azureCluster Required. - * @param string $subjectToken Required. - * @param string $subjectTokenType Required. - * @param string $version Required. - * @param array $optionalArgs { - * Optional. - * - * @type string $nodePoolId - * Optional. - * @type string $grantType - * Optional. - * @type string $audience - * Optional. - * @type string $scope - * Optional. - * @type string $requestedTokenType - * Optional. - * @type string $options - * Optional. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAzureClusterAgentToken($azureCluster, $subjectToken, $subjectTokenType, $version, array $optionalArgs = []) - { - $request = new GenerateAzureClusterAgentTokenRequest(); - $requestParamHeaders = []; - $request->setAzureCluster($azureCluster); - $request->setSubjectToken($subjectToken); - $request->setSubjectTokenType($subjectTokenType); - $request->setVersion($version); - $requestParamHeaders['azure_cluster'] = $azureCluster; - if (isset($optionalArgs['nodePoolId'])) { - $request->setNodePoolId($optionalArgs['nodePoolId']); - } - - if (isset($optionalArgs['grantType'])) { - $request->setGrantType($optionalArgs['grantType']); - } - - if (isset($optionalArgs['audience'])) { - $request->setAudience($optionalArgs['audience']); - } - - if (isset($optionalArgs['scope'])) { - $request->setScope($optionalArgs['scope']); - } - - if (isset($optionalArgs['requestedTokenType'])) { - $request->setRequestedTokenType($optionalArgs['requestedTokenType']); - } - - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAzureClusterAgentToken', GenerateAzureClusterAgentTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Describes a specific - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - * $response = $azureClustersClient->getAzureClient($formattedName); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClient - * - * @throws ApiException if the remote call fails - */ - public function getAzureClient($name, array $optionalArgs = []) - { - $request = new GetAzureClientRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAzureClient', AzureClient::class, $optionalArgs, $request)->wait(); - } - - /** - * Describes a specific - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $response = $azureClustersClient->getAzureCluster($formattedName); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster - * - * @throws ApiException if the remote call fails - */ - public function getAzureCluster($name, array $optionalArgs = []) - { - $request = new GetAzureClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAzureCluster', AzureCluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $response = $azureClustersClient->getAzureJsonWebKeys($formattedAzureCluster); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys. - * Format: - * projects//locations//azureClusters/ - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys - * - * @throws ApiException if the remote call fails - */ - public function getAzureJsonWebKeys($azureCluster, array $optionalArgs = []) - { - $request = new GetAzureJsonWebKeysRequest(); - $requestParamHeaders = []; - $request->setAzureCluster($azureCluster); - $requestParamHeaders['azure_cluster'] = $azureCluster; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAzureJsonWebKeys', AzureJsonWebKeys::class, $optionalArgs, $request)->wait(); - } - - /** - * Describes a specific - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - * $response = $azureClustersClient->getAzureNodePool($formattedName); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool - * - * @throws ApiException if the remote call fails - */ - public function getAzureNodePool($name, array $optionalArgs = []) - { - $request = new GetAzureNodePoolRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAzureNodePool', AzureNodePool::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the OIDC discovery document for the cluster. - * See the - * [OpenID Connect Discovery 1.0 - * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) - * for details. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedAzureCluster = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * $response = $azureClustersClient->getAzureOpenIdConfig($formattedAzureCluster); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $azureCluster Required. The AzureCluster, which owns the OIDC discovery document. - * Format: - * projects//locations//azureClusters/ - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig - * - * @throws ApiException if the remote call fails - */ - public function getAzureOpenIdConfig($azureCluster, array $optionalArgs = []) - { - $request = new GetAzureOpenIdConfigRequest(); - $requestParamHeaders = []; - $request->setAzureCluster($azureCluster); - $requestParamHeaders['azure_cluster'] = $azureCluster; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAzureOpenIdConfig', AzureOpenIdConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns information, such as supported Azure regions and Kubernetes - * versions, on a given Google Cloud location. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedName = $azureClustersClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); - * $response = $azureClustersClient->getAzureServerConfig($formattedName); - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\GkeMultiCloud\V1\AzureServerConfig - * - * @throws ApiException if the remote call fails - */ - public function getAzureServerConfig($name, array $optionalArgs = []) - { - $request = new GetAzureServerConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAzureServerConfig', AzureServerConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources on a given Google Cloud project and region. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $azureClustersClient->listAzureClients($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $azureClustersClient->listAzureClients($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAzureClients($parent, array $optionalArgs = []) - { - $request = new ListAzureClientsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAzureClients', $optionalArgs, ListAzureClientsResponse::class, $request); - } - - /** - * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources on a given Google Cloud project and region. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedParent = $azureClustersClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $azureClustersClient->listAzureClusters($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $azureClustersClient->listAzureClusters($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAzureClusters($parent, array $optionalArgs = []) - { - $request = new ListAzureClustersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAzureClusters', $optionalArgs, ListAzureClustersResponse::class, $request); - } - - /** - * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources on a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $formattedParent = $azureClustersClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - * // Iterate over pages of elements - * $pagedResponse = $azureClustersClient->listAzureNodePools($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $azureClustersClient->listAzureNodePools($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAzureNodePools($parent, array $optionalArgs = []) - { - $request = new ListAzureNodePoolsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAzureNodePools', $optionalArgs, ListAzureNodePoolsResponse::class, $request); - } - - /** - * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $azureCluster = new AzureCluster(); - * $updateMask = new FieldMask(); - * $operationResponse = $azureClustersClient->updateAzureCluster($azureCluster, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->updateAzureCluster($azureCluster, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'updateAzureCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but do not actually update the cluster. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAzureCluster($azureCluster, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAzureClusterRequest(); - $requestParamHeaders = []; - $request->setAzureCluster($azureCluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['azure_cluster.name'] = $azureCluster->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAzureCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * - * Sample code: - * ``` - * $azureClustersClient = new AzureClustersClient(); - * try { - * $azureNodePool = new AzureNodePool(); - * $updateMask = new FieldMask(); - * $operationResponse = $azureClustersClient->updateAzureNodePool($azureNodePool, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $azureClustersClient->updateAzureNodePool($azureNodePool, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $azureClustersClient->resumeOperation($operationName, 'updateAzureNodePool'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $azureClustersClient->close(); - * } - * ``` - * - * @param AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If set, only validate the request, but don't actually update the node pool. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAzureNodePool($azureNodePool, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAzureNodePoolRequest(); - $requestParamHeaders = []; - $request->setAzureNodePool($azureNodePool); - $request->setUpdateMask($updateMask); - $requestParamHeaders['azure_node_pool.name'] = $azureNodePool->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAzureNodePool', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 511a1a11b279..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gkemulticloud.v1", - "libraryPackage": "Google\\Cloud\\GkeMultiCloud\\V1", - "services": { - "AttachedClusters": { - "clients": { - "grpc": { - "libraryClient": "AttachedClustersGapicClient", - "rpcs": { - "CreateAttachedCluster": { - "methods": [ - "createAttachedCluster" - ] - }, - "DeleteAttachedCluster": { - "methods": [ - "deleteAttachedCluster" - ] - }, - "GenerateAttachedClusterAgentToken": { - "methods": [ - "generateAttachedClusterAgentToken" - ] - }, - "GenerateAttachedClusterInstallManifest": { - "methods": [ - "generateAttachedClusterInstallManifest" - ] - }, - "GetAttachedCluster": { - "methods": [ - "getAttachedCluster" - ] - }, - "GetAttachedServerConfig": { - "methods": [ - "getAttachedServerConfig" - ] - }, - "ImportAttachedCluster": { - "methods": [ - "importAttachedCluster" - ] - }, - "ListAttachedClusters": { - "methods": [ - "listAttachedClusters" - ] - }, - "UpdateAttachedCluster": { - "methods": [ - "updateAttachedCluster" - ] - } - } - } - } - }, - "AwsClusters": { - "clients": { - "grpc": { - "libraryClient": "AwsClustersGapicClient", - "rpcs": { - "CreateAwsCluster": { - "methods": [ - "createAwsCluster" - ] - }, - "CreateAwsNodePool": { - "methods": [ - "createAwsNodePool" - ] - }, - "DeleteAwsCluster": { - "methods": [ - "deleteAwsCluster" - ] - }, - "DeleteAwsNodePool": { - "methods": [ - "deleteAwsNodePool" - ] - }, - "GenerateAwsAccessToken": { - "methods": [ - "generateAwsAccessToken" - ] - }, - "GenerateAwsClusterAgentToken": { - "methods": [ - "generateAwsClusterAgentToken" - ] - }, - "GetAwsCluster": { - "methods": [ - "getAwsCluster" - ] - }, - "GetAwsJsonWebKeys": { - "methods": [ - "getAwsJsonWebKeys" - ] - }, - "GetAwsNodePool": { - "methods": [ - "getAwsNodePool" - ] - }, - "GetAwsOpenIdConfig": { - "methods": [ - "getAwsOpenIdConfig" - ] - }, - "GetAwsServerConfig": { - "methods": [ - "getAwsServerConfig" - ] - }, - "ListAwsClusters": { - "methods": [ - "listAwsClusters" - ] - }, - "ListAwsNodePools": { - "methods": [ - "listAwsNodePools" - ] - }, - "RollbackAwsNodePoolUpdate": { - "methods": [ - "rollbackAwsNodePoolUpdate" - ] - }, - "UpdateAwsCluster": { - "methods": [ - "updateAwsCluster" - ] - }, - "UpdateAwsNodePool": { - "methods": [ - "updateAwsNodePool" - ] - } - } - } - } - }, - "AzureClusters": { - "clients": { - "grpc": { - "libraryClient": "AzureClustersGapicClient", - "rpcs": { - "CreateAzureClient": { - "methods": [ - "createAzureClient" - ] - }, - "CreateAzureCluster": { - "methods": [ - "createAzureCluster" - ] - }, - "CreateAzureNodePool": { - "methods": [ - "createAzureNodePool" - ] - }, - "DeleteAzureClient": { - "methods": [ - "deleteAzureClient" - ] - }, - "DeleteAzureCluster": { - "methods": [ - "deleteAzureCluster" - ] - }, - "DeleteAzureNodePool": { - "methods": [ - "deleteAzureNodePool" - ] - }, - "GenerateAzureAccessToken": { - "methods": [ - "generateAzureAccessToken" - ] - }, - "GenerateAzureClusterAgentToken": { - "methods": [ - "generateAzureClusterAgentToken" - ] - }, - "GetAzureClient": { - "methods": [ - "getAzureClient" - ] - }, - "GetAzureCluster": { - "methods": [ - "getAzureCluster" - ] - }, - "GetAzureJsonWebKeys": { - "methods": [ - "getAzureJsonWebKeys" - ] - }, - "GetAzureNodePool": { - "methods": [ - "getAzureNodePool" - ] - }, - "GetAzureOpenIdConfig": { - "methods": [ - "getAzureOpenIdConfig" - ] - }, - "GetAzureServerConfig": { - "methods": [ - "getAzureServerConfig" - ] - }, - "ListAzureClients": { - "methods": [ - "listAzureClients" - ] - }, - "ListAzureClusters": { - "methods": [ - "listAzureClusters" - ] - }, - "ListAzureNodePools": { - "methods": [ - "listAzureNodePools" - ] - }, - "UpdateAzureCluster": { - "methods": [ - "updateAzureCluster" - ] - }, - "UpdateAzureNodePool": { - "methods": [ - "updateAzureNodePool" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json deleted file mode 100644 index 54292e4dc542..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AttachedClusters": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAttachedClusterAgentToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateAttachedClusterInstallManifest": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAttachedServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAttachedClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php deleted file mode 100644 index a128879d6ff7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php +++ /dev/null @@ -1,158 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AttachedClusters' => [ - 'CreateAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'attached_cluster.name', - 'fieldAccessors' => [ - 'getAttachedCluster', - 'getName', - ], - ], - ], - ], - 'GenerateAttachedClusterAgentToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'attached_cluster', - 'fieldAccessors' => [ - 'getAttachedCluster', - ], - ], - ], - ], - 'GenerateAttachedClusterInstallManifest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetAttachedCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAttachedServerConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachedClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachedClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachedCluster' => 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}', - 'attachedServerConfig' => 'projects/{project}/locations/{location}/attachedServerConfig', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php deleted file mode 100644 index 364619157fb7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php +++ /dev/null @@ -1,165 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AttachedClusters' => [ - 'CreateAttachedCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters', - 'body' => 'attached_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'attached_cluster_id', - ], - ], - 'DeleteAttachedCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAttachedClusterAgentToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken', - 'body' => '*', - 'placeholders' => [ - 'attached_cluster' => [ - 'getters' => [ - 'getAttachedCluster', - ], - ], - ], - ], - 'GenerateAttachedClusterInstallManifest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetAttachedCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAttachedServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedServerConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportAttachedCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAttachedClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAttachedCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}', - 'body' => 'attached_cluster', - 'placeholders' => [ - 'attached_cluster.name' => [ - 'getters' => [ - 'getAttachedCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json deleted file mode 100644 index 25741e0c9cd6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AwsClusters": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAwsAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateAwsClusterAgentToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsJsonWebKeys": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsOpenIdConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAwsClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAwsNodePools": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RollbackAwsNodePoolUpdate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php deleted file mode 100644 index 03604870910b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php +++ /dev/null @@ -1,273 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AwsClusters' => [ - 'CreateAwsCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAwsNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAwsCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAwsNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RollbackAwsNodePoolUpdate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAwsCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster.name', - 'fieldAccessors' => [ - 'getAwsCluster', - 'getName', - ], - ], - ], - ], - 'UpdateAwsNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'aws_node_pool.name', - 'fieldAccessors' => [ - 'getAwsNodePool', - 'getName', - ], - ], - ], - ], - 'GenerateAwsAccessToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GenerateAwsClusterAgentToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsJsonWebKeys' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsNodePool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsOpenIdConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsServerConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsServerConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAwsClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAwsClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAwsNodePools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAwsNodePools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'awsCluster' => 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}', - 'awsNodePool' => 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}', - 'awsServerConfig' => 'projects/{project}/locations/{location}/awsServerConfig', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php deleted file mode 100644 index 282fd1407fc1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php +++ /dev/null @@ -1,251 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AwsClusters' => [ - 'CreateAwsCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/awsClusters', - 'body' => 'aws_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'aws_cluster_id', - ], - ], - 'CreateAwsNodePool' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools', - 'body' => 'aws_node_pool', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'aws_node_pool_id', - ], - ], - 'DeleteAwsCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAwsNodePool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAwsAccessToken' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GenerateAwsClusterAgentToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken', - 'body' => '*', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsJsonWebKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwks', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsNodePool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsOpenIdConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configuration', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsServerConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAwsClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/awsClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAwsNodePools' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RollbackAwsNodePoolUpdate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAwsCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}', - 'body' => 'aws_cluster', - 'placeholders' => [ - 'aws_cluster.name' => [ - 'getters' => [ - 'getAwsCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateAwsNodePool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', - 'body' => 'aws_node_pool', - 'placeholders' => [ - 'aws_node_pool.name' => [ - 'getters' => [ - 'getAwsNodePool', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json deleted file mode 100644 index 4b2a2924b13c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AzureClusters": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAzureAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateAzureClusterAgentToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureJsonWebKeys": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureOpenIdConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAzureClients": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAzureClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAzureNodePools": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php deleted file mode 100644 index e50260fa88ca..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php +++ /dev/null @@ -1,325 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AzureClusters' => [ - 'CreateAzureClient' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureClient', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAzureCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAzureNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAzureClient' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAzureCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster.name', - 'fieldAccessors' => [ - 'getAzureCluster', - 'getName', - ], - ], - ], - ], - 'UpdateAzureNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'azure_node_pool.name', - 'fieldAccessors' => [ - 'getAzureNodePool', - 'getName', - ], - ], - ], - ], - 'GenerateAzureAccessToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GenerateAzureClusterAgentToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureClient' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureClient', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureJsonWebKeys' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureNodePool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureNodePool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureOpenIdConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureServerConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureServerConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAzureClients' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAzureClients', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAzureClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureNodePools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAzureNodePools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'azureClient' => 'projects/{project}/locations/{location}/azureClients/{azure_client}', - 'azureCluster' => 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}', - 'azureNodePool' => 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}', - 'azureServerConfig' => 'projects/{project}/locations/{location}/azureServerConfig', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php deleted file mode 100644 index 69cbb41b0927..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php +++ /dev/null @@ -1,287 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AzureClusters' => [ - 'CreateAzureClient' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClients', - 'body' => 'azure_client', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'azure_client_id', - ], - ], - 'CreateAzureCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClusters', - 'body' => 'azure_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'azure_cluster_id', - ], - ], - 'CreateAzureNodePool' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools', - 'body' => 'azure_node_pool', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'azure_node_pool_id', - ], - ], - 'DeleteAzureClient' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureNodePool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAzureAccessToken' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GenerateAzureClusterAgentToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken', - 'body' => '*', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureClient' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureJsonWebKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwks', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureNodePool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureOpenIdConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configuration', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureServerConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAzureClients' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClients', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureNodePools' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAzureCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}', - 'body' => 'azure_cluster', - 'placeholders' => [ - 'azure_cluster.name' => [ - 'getters' => [ - 'getAzureCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateAzureNodePool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', - 'body' => 'azure_node_pool', - 'placeholders' => [ - 'azure_node_pool.name' => [ - 'getters' => [ - 'getAzureNodePool', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php deleted file mode 100644 index e7c525d0d211..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AttachedClustersClientTest.php +++ /dev/null @@ -1,1007 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AttachedClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AttachedClustersClient($options); - } - - /** @test */ - public function createAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $response = $gapicClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $response = $gapicClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $response = $gapicClient->deleteAttachedCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $response = $gapicClient->deleteAttachedCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $response = $gapicClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterAgentTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - try { - $gapicClient->generateAttachedClusterAgentToken($formattedAttachedCluster, $subjectToken, $subjectTokenType, $version); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterInstallManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $manifest = 'manifest130625071'; - $expectedResponse = new GenerateAttachedClusterInstallManifestResponse(); - $expectedResponse->setManifest($manifest); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = 'attachedClusterId-249426181'; - $platformVersion = 'platformVersion1813514508'; - $response = $gapicClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $actualValue = $actualRequestObject->getPlatformVersion(); - $this->assertProtobufEquals($platformVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterInstallManifestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = 'attachedClusterId-249426181'; - $platformVersion = 'platformVersion1813514508'; - try { - $gapicClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $response = $gapicClient->getAttachedCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - try { - $gapicClient->getAttachedCluster($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AttachedServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->getAttachedServerConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->getAttachedServerConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion2 = 'platformVersion2-969276993'; - $distribution2 = 'distribution21357826359'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion2); - $expectedResponse->setDistribution($distribution2); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = 'fleetMembership1817977703'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $response = $gapicClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFleetMembership(); - $this->assertProtobufEquals($fleetMembership, $actualValue); - $actualValue = $actualApiRequestObject->getPlatformVersion(); - $this->assertProtobufEquals($platformVersion, $actualValue); - $actualValue = $actualApiRequestObject->getDistribution(); - $this->assertProtobufEquals($distribution, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = 'fleetMembership1817977703'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $response = $gapicClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listAttachedClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachedClustersElement = new AttachedCluster(); - $attachedClusters = [ - $attachedClustersElement, - ]; - $expectedResponse = new ListAttachedClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachedClusters($attachedClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listAttachedClusters($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachedClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachedClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listAttachedClusters($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAttachedCluster($attachedCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAttachedCluster($attachedCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php deleted file mode 100644 index d09c68322f4f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AwsClustersClientTest.php +++ /dev/null @@ -1,1824 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AwsClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AwsClustersClient($options); - } - - /** @test */ - public function createAwsClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $response = $gapicClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAwsClusterId(); - $this->assertProtobufEquals($awsClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $response = $gapicClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $awsNodePoolId = 'awsNodePoolId1958033635'; - $response = $gapicClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsNodePool(); - $this->assertProtobufEquals($awsNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getAwsNodePoolId(); - $this->assertProtobufEquals($awsNodePoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $awsNodePoolId = 'awsNodePoolId1958033635'; - $response = $gapicClient->createAwsNodePool($formattedParent, $awsNodePool, $awsNodePoolId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->deleteAwsCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->deleteAwsCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $response = $gapicClient->deleteAwsNodePool($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $response = $gapicClient->deleteAwsNodePool($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAwsAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAwsAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->generateAwsAccessToken($formattedAwsCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsAccessTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - try { - $gapicClient->generateAwsAccessToken($formattedAwsCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $response = $gapicClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsClusterAgentTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - try { - $gapicClient->generateAwsClusterAgentToken($formattedAwsCluster, $subjectToken, $subjectTokenType, $version); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->getAwsCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - try { - $gapicClient->getAwsCluster($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsJsonWebKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AwsJsonWebKeys(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->getAwsJsonWebKeys($formattedAwsCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsJsonWebKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - try { - $gapicClient->getAwsJsonWebKeys($formattedAwsCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsNodePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $response = $gapicClient->getAwsNodePool($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsNodePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsNodePoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - try { - $gapicClient->getAwsNodePool($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsOpenIdConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $issuer = 'issuer-1179159879'; - $jwksUri = 'jwksUri1465527714'; - $expectedResponse = new AwsOpenIdConfig(); - $expectedResponse->setIssuer($issuer); - $expectedResponse->setJwksUri($jwksUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->getAwsOpenIdConfig($formattedAwsCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsOpenIdConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - try { - $gapicClient->getAwsOpenIdConfig($formattedAwsCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AwsServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->getAwsServerConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->getAwsServerConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $awsClustersElement = new AwsCluster(); - $awsClusters = [ - $awsClustersElement, - ]; - $expectedResponse = new ListAwsClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAwsClusters($awsClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listAwsClusters($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAwsClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listAwsClusters($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsNodePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $awsNodePoolsElement = new AwsNodePool(); - $awsNodePools = [ - $awsNodePoolsElement, - ]; - $expectedResponse = new ListAwsNodePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAwsNodePools($awsNodePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $response = $gapicClient->listAwsNodePools($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAwsNodePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsNodePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsNodePoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - try { - $gapicClient->listAwsNodePools($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackAwsNodePoolUpdateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $response = $gapicClient->rollbackAwsNodePoolUpdate($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rollbackAwsNodePoolUpdateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $response = $gapicClient->rollbackAwsNodePoolUpdate($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAwsCluster($awsCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAwsCluster($awsCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAwsNodePool($awsNodePool, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAwsNodePool(); - $this->assertProtobufEquals($awsNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAwsNodePool($awsNodePool, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php deleted file mode 100644 index e7886b33dcf7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/AzureClustersClientTest.php +++ /dev/null @@ -1,2065 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AzureClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AzureClustersClient($options); - } - - /** @test */ - public function createAzureClientTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $response = $gapicClient->createAzureClient($formattedParent, $azureClient, $azureClientId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClient(); - $this->assertProtobufEquals($azureClient, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClientId(); - $this->assertProtobufEquals($azureClientId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClientExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $response = $gapicClient->createAzureClient($formattedParent, $azureClient, $azureClientId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $azureClusterId = 'azureClusterId332577072'; - $response = $gapicClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureCluster(); - $this->assertProtobufEquals($azureCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClusterId(); - $this->assertProtobufEquals($azureClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $azureClusterId = 'azureClusterId332577072'; - $response = $gapicClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $azureNodePoolId = 'azureNodePoolId-454365551'; - $response = $gapicClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureNodePool(); - $this->assertProtobufEquals($azureNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getAzureNodePoolId(); - $this->assertProtobufEquals($azureNodePoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $azureNodePoolId = 'azureNodePoolId-454365551'; - $response = $gapicClient->createAzureNodePool($formattedParent, $azureNodePool, $azureNodePoolId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClientTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $response = $gapicClient->deleteAzureClient($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClientExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $response = $gapicClient->deleteAzureClient($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->deleteAzureCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->deleteAzureCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $response = $gapicClient->deleteAzureNodePool($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $response = $gapicClient->deleteAzureNodePool($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAzureAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAzureAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->generateAzureAccessToken($formattedAzureCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureAccessTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - try { - $gapicClient->generateAzureAccessToken($formattedAzureCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $response = $gapicClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureClusterAgentTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - try { - $gapicClient->generateAzureClusterAgentToken($formattedAzureCluster, $subjectToken, $subjectTokenType, $version); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name2); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $response = $gapicClient->getAzureClient($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClientExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - try { - $gapicClient->getAzureClient($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->getAzureCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - try { - $gapicClient->getAzureCluster($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureJsonWebKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AzureJsonWebKeys(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->getAzureJsonWebKeys($formattedAzureCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureJsonWebKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - try { - $gapicClient->getAzureJsonWebKeys($formattedAzureCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureNodePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $response = $gapicClient->getAzureNodePool($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureNodePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureNodePoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - try { - $gapicClient->getAzureNodePool($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureOpenIdConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $issuer = 'issuer-1179159879'; - $jwksUri = 'jwksUri1465527714'; - $expectedResponse = new AzureOpenIdConfig(); - $expectedResponse->setIssuer($issuer); - $expectedResponse->setJwksUri($jwksUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->getAzureOpenIdConfig($formattedAzureCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureOpenIdConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - try { - $gapicClient->getAzureOpenIdConfig($formattedAzureCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AzureServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->getAzureServerConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->getAzureServerConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClientsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureClientsElement = new AzureClient(); - $azureClients = [ - $azureClientsElement, - ]; - $expectedResponse = new ListAzureClientsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureClients($azureClients); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listAzureClients($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureClients()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClients', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClientsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listAzureClients($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureClustersElement = new AzureCluster(); - $azureClusters = [ - $azureClustersElement, - ]; - $expectedResponse = new ListAzureClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureClusters($azureClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listAzureClusters($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listAzureClusters($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureNodePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureNodePoolsElement = new AzureNodePool(); - $azureNodePools = [ - $azureNodePoolsElement, - ]; - $expectedResponse = new ListAzureNodePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureNodePools($azureNodePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $response = $gapicClient->listAzureNodePools($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureNodePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureNodePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureNodePoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - try { - $gapicClient->listAzureNodePools($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAzureClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAzureCluster($azureCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAzureCluster(); - $this->assertProtobufEquals($azureCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAzureClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAzureCluster($azureCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAzureNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAzureNodePool($azureNodePool, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAzureNodePool(); - $this->assertProtobufEquals($azureNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAzureNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAzureNodePool($azureNodePool, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php deleted file mode 100644 index 67d612dd5cc3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php +++ /dev/null @@ -1,1174 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AttachedClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AttachedClustersClient($options); - } - - /** @test */ - public function createAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - $response = $gapicClient->createAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - $response = $gapicClient->createAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new DeleteAttachedClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new DeleteAttachedClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAttachedClusterAgentTokenRequest()) - ->setAttachedCluster($formattedAttachedCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - $response = $gapicClient->generateAttachedClusterAgentToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterAgentTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAttachedClusterAgentTokenRequest()) - ->setAttachedCluster($formattedAttachedCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - try { - $gapicClient->generateAttachedClusterAgentToken($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterInstallManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $manifest = 'manifest130625071'; - $expectedResponse = new GenerateAttachedClusterInstallManifestResponse(); - $expectedResponse->setManifest($manifest); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = 'attachedClusterId-249426181'; - $platformVersion = 'platformVersion1813514508'; - $request = (new GenerateAttachedClusterInstallManifestRequest()) - ->setParent($formattedParent) - ->setAttachedClusterId($attachedClusterId) - ->setPlatformVersion($platformVersion); - $response = $gapicClient->generateAttachedClusterInstallManifest($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $actualValue = $actualRequestObject->getPlatformVersion(); - $this->assertProtobufEquals($platformVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterInstallManifestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = 'attachedClusterId-249426181'; - $platformVersion = 'platformVersion1813514508'; - $request = (new GenerateAttachedClusterInstallManifestRequest()) - ->setParent($formattedParent) - ->setAttachedClusterId($attachedClusterId) - ->setPlatformVersion($platformVersion); - try { - $gapicClient->generateAttachedClusterInstallManifest($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new GetAttachedClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachedCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new GetAttachedClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachedCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AttachedServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAttachedServerConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachedServerConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAttachedServerConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachedServerConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion2 = 'platformVersion2-969276993'; - $distribution2 = 'distribution21357826359'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion2); - $expectedResponse->setDistribution($distribution2); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = 'fleetMembership1817977703'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $request = (new ImportAttachedClusterRequest()) - ->setParent($formattedParent) - ->setFleetMembership($fleetMembership) - ->setPlatformVersion($platformVersion) - ->setDistribution($distribution); - $response = $gapicClient->importAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFleetMembership(); - $this->assertProtobufEquals($fleetMembership, $actualValue); - $actualValue = $actualApiRequestObject->getPlatformVersion(); - $this->assertProtobufEquals($platformVersion, $actualValue); - $actualValue = $actualApiRequestObject->getDistribution(); - $this->assertProtobufEquals($distribution, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = 'fleetMembership1817977703'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $request = (new ImportAttachedClusterRequest()) - ->setParent($formattedParent) - ->setFleetMembership($fleetMembership) - ->setPlatformVersion($platformVersion) - ->setDistribution($distribution); - $response = $gapicClient->importAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listAttachedClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachedClustersElement = new AttachedCluster(); - $attachedClusters = [ - $attachedClustersElement, - ]; - $expectedResponse = new ListAttachedClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachedClusters($attachedClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAttachedClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachedClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachedClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachedClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAttachedClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachedClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAttachedClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAttachedClusterRequest()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAttachedClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAttachedClusterRequest()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAttachedClusterAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - $response = $gapicClient->createAttachedClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php deleted file mode 100644 index 6f139fc7e8f7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php +++ /dev/null @@ -1,2046 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AwsClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AwsClustersClient($options); - } - - /** @test */ - public function createAwsClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - $response = $gapicClient->createAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAwsClusterId(); - $this->assertProtobufEquals($awsClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - $response = $gapicClient->createAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $awsNodePoolId = 'awsNodePoolId1958033635'; - $request = (new CreateAwsNodePoolRequest()) - ->setParent($formattedParent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - $response = $gapicClient->createAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsNodePool(); - $this->assertProtobufEquals($awsNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getAwsNodePoolId(); - $this->assertProtobufEquals($awsNodePoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $awsNodePoolId = 'awsNodePoolId1958033635'; - $request = (new CreateAwsNodePoolRequest()) - ->setParent($formattedParent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - $response = $gapicClient->createAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new DeleteAwsClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new DeleteAwsClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new DeleteAwsNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAwsNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new DeleteAwsNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAwsAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAwsAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GenerateAwsAccessTokenRequest()) - ->setAwsCluster($formattedAwsCluster); - $response = $gapicClient->generateAwsAccessToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsAccessTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GenerateAwsAccessTokenRequest()) - ->setAwsCluster($formattedAwsCluster); - try { - $gapicClient->generateAwsAccessToken($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAwsClusterAgentTokenRequest()) - ->setAwsCluster($formattedAwsCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - $response = $gapicClient->generateAwsClusterAgentToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsClusterAgentTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAwsClusterAgentTokenRequest()) - ->setAwsCluster($formattedAwsCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - try { - $gapicClient->generateAwsClusterAgentToken($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getAwsCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getAwsCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsJsonWebKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AwsJsonWebKeys(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsJsonWebKeysRequest()) - ->setAwsCluster($formattedAwsCluster); - $response = $gapicClient->getAwsJsonWebKeys($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsJsonWebKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsJsonWebKeysRequest()) - ->setAwsCluster($formattedAwsCluster); - try { - $gapicClient->getAwsJsonWebKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsNodePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new GetAwsNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getAwsNodePool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsNodePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsNodePoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new GetAwsNodePoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getAwsNodePool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsOpenIdConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $issuer = 'issuer-1179159879'; - $jwksUri = 'jwksUri1465527714'; - $expectedResponse = new AwsOpenIdConfig(); - $expectedResponse->setIssuer($issuer); - $expectedResponse->setJwksUri($jwksUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsOpenIdConfigRequest()) - ->setAwsCluster($formattedAwsCluster); - $response = $gapicClient->getAwsOpenIdConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsOpenIdConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsOpenIdConfigRequest()) - ->setAwsCluster($formattedAwsCluster); - try { - $gapicClient->getAwsOpenIdConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AwsServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAwsServerConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAwsServerConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/GetAwsServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAwsServerConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAwsServerConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $awsClustersElement = new AwsCluster(); - $awsClusters = [ - $awsClustersElement, - ]; - $expectedResponse = new ListAwsClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAwsClusters($awsClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAwsClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAwsClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAwsClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAwsClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAwsClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsNodePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $awsNodePoolsElement = new AwsNodePool(); - $awsNodePools = [ - $awsNodePoolsElement, - ]; - $expectedResponse = new ListAwsNodePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAwsNodePools($awsNodePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new ListAwsNodePoolsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAwsNodePools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAwsNodePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsNodePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsNodePoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new ListAwsNodePoolsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAwsNodePools($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackAwsNodePoolUpdateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new RollbackAwsNodePoolUpdateRequest()) - ->setName($formattedName); - $response = $gapicClient->rollbackAwsNodePoolUpdate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rollbackAwsNodePoolUpdateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new RollbackAwsNodePoolUpdateRequest()) - ->setName($formattedName); - $response = $gapicClient->rollbackAwsNodePoolUpdate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAwsClusterRequest()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAwsClusterRequest()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAwsNodePoolRequest()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAwsNodePool(); - $this->assertProtobufEquals($awsNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAwsNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAwsNodePoolRequest()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAwsClusterAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - $response = $gapicClient->createAwsClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAwsClusterId(); - $this->assertProtobufEquals($awsClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php deleted file mode 100644 index a16b92d02cae..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php +++ /dev/null @@ -1,2270 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AzureClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AzureClustersClient($options); - } - - /** @test */ - public function createAzureClientTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - $response = $gapicClient->createAzureClient($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClient(); - $this->assertProtobufEquals($azureClient, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClientId(); - $this->assertProtobufEquals($azureClientId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClientExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - $response = $gapicClient->createAzureClient($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $azureClusterId = 'azureClusterId332577072'; - $request = (new CreateAzureClusterRequest()) - ->setParent($formattedParent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - $response = $gapicClient->createAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureCluster(); - $this->assertProtobufEquals($azureCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClusterId(); - $this->assertProtobufEquals($azureClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $azureClusterId = 'azureClusterId332577072'; - $request = (new CreateAzureClusterRequest()) - ->setParent($formattedParent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - $response = $gapicClient->createAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $azureNodePoolId = 'azureNodePoolId-454365551'; - $request = (new CreateAzureNodePoolRequest()) - ->setParent($formattedParent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - $response = $gapicClient->createAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureNodePool(); - $this->assertProtobufEquals($azureNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getAzureNodePoolId(); - $this->assertProtobufEquals($azureNodePoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $azureNodePoolId = 'azureNodePoolId-454365551'; - $request = (new CreateAzureNodePoolRequest()) - ->setParent($formattedParent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - $response = $gapicClient->createAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClientTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new DeleteAzureClientRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureClient($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClientExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new DeleteAzureClientRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureClient($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new DeleteAzureClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new DeleteAzureClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new DeleteAzureNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAzureNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new DeleteAzureNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAzureAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAzureAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GenerateAzureAccessTokenRequest()) - ->setAzureCluster($formattedAzureCluster); - $response = $gapicClient->generateAzureAccessToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureAccessTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GenerateAzureAccessTokenRequest()) - ->setAzureCluster($formattedAzureCluster); - try { - $gapicClient->generateAzureAccessToken($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAzureClusterAgentTokenRequest()) - ->setAzureCluster($formattedAzureCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - $response = $gapicClient->generateAzureClusterAgentToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureClusterAgentTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAzureClusterAgentTokenRequest()) - ->setAzureCluster($formattedAzureCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - try { - $gapicClient->generateAzureClusterAgentToken($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name2); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new GetAzureClientRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureClient($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClientExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new GetAzureClientRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureClient($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureJsonWebKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AzureJsonWebKeys(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureJsonWebKeysRequest()) - ->setAzureCluster($formattedAzureCluster); - $response = $gapicClient->getAzureJsonWebKeys($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureJsonWebKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureJsonWebKeysRequest()) - ->setAzureCluster($formattedAzureCluster); - try { - $gapicClient->getAzureJsonWebKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureNodePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new GetAzureNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureNodePool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureNodePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureNodePoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new GetAzureNodePoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureNodePool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureOpenIdConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $issuer = 'issuer-1179159879'; - $jwksUri = 'jwksUri1465527714'; - $expectedResponse = new AzureOpenIdConfig(); - $expectedResponse->setIssuer($issuer); - $expectedResponse->setJwksUri($jwksUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureOpenIdConfigRequest()) - ->setAzureCluster($formattedAzureCluster); - $response = $gapicClient->getAzureOpenIdConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureOpenIdConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureOpenIdConfigRequest()) - ->setAzureCluster($formattedAzureCluster); - try { - $gapicClient->getAzureOpenIdConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AzureServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAzureServerConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureServerConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/GetAzureServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAzureServerConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureServerConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClientsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureClientsElement = new AzureClient(); - $azureClients = [ - $azureClientsElement, - ]; - $expectedResponse = new ListAzureClientsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureClients($azureClients); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAzureClientsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAzureClients($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureClients()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClients', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClientsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAzureClientsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAzureClients($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureClustersElement = new AzureCluster(); - $azureClusters = [ - $azureClustersElement, - ]; - $expectedResponse = new ListAzureClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureClusters($azureClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAzureClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAzureClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAzureClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAzureClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureNodePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureNodePoolsElement = new AzureNodePool(); - $azureNodePools = [ - $azureNodePoolsElement, - ]; - $expectedResponse = new ListAzureNodePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureNodePools($azureNodePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new ListAzureNodePoolsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAzureNodePools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureNodePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureNodePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureNodePoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new ListAzureNodePoolsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAzureNodePools($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAzureClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAzureClusterRequest()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAzureCluster(); - $this->assertProtobufEquals($azureCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAzureClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAzureClusterRequest()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAzureNodePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAzureNodePoolRequest()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAzureNodePool(); - $this->assertProtobufEquals($azureNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAzureNodePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAzureNodePoolRequest()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAzureClientAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - $response = $gapicClient->createAzureClientAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClient(); - $this->assertProtobufEquals($azureClient, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClientId(); - $this->assertProtobufEquals($azureClientId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}