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 000000000000..4a1950e312ef Binary files /dev/null and b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php differ 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..5bbcada37da6 --- /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"£ÊA$ +AttachedClusterOperationMetadataÚA+parent,attached_cluster,attached_cluster_id‚Óä“H"4/v1/{parent=projects/*/locations/*}/attachedClusters:attached_cluster› +UpdateAttachedCluster;.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.google.longrunning.Operation"¥ÊA$ +AttachedClusterOperationMetadataÚAattached_cluster,update_mask‚Óä“Y2E/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}:attached_clusterý +ImportAttachedCluster;.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.google.longrunning.Operation"‡ÊA$ +AttachedClusterOperationMetadataÚAparent,fleet_membership‚Óä“@";/v1/{parent=projects/*/locations/*}/attachedClusters:import:*à +GetAttachedCluster8.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest..google.cloud.gkemulticloud.v1.AttachedCluster"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/attachedClusters/*}Ö +ListAttachedClusters:.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*}/attachedClusterså +DeleteAttachedCluster;.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.google.longrunning.Operation"pÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“6*4/v1/{name=projects/*/locations/*/attachedClusters/*}Ô +GetAttachedServerConfig=.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest3.google.cloud.gkemulticloud.v1.AttachedServerConfig"EÚAname‚Óä“86/v1/{name=projects/*/locations/*/attachedServerConfig}¶ +&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"oÚAparent,attached_cluster_id‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest¥ +!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 000000000000..c45c3fbfda31 Binary files /dev/null and b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php differ 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..754f9ac6a9db --- /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"ŠÊA + +AwsClusterOperationMetadataÚA!parent,aws_cluster,aws_cluster_id‚Óä“>"//v1/{parent=projects/*/locations/*}/awsClusters: aws_clusterø +UpdateAwsCluster6.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.google.longrunning.Operation"ŒÊA + +AwsClusterOperationMetadataÚAaws_cluster,update_mask‚Óä“J2;/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}: aws_cluster¯ + GetAwsCluster3.google.cloud.gkemulticloud.v1.GetAwsClusterRequest).google.cloud.gkemulticloud.v1.AwsCluster">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/awsClusters/*} +ListAwsClusters5.google.cloud.gkemulticloud.v1.ListAwsClustersRequest6.google.cloud.gkemulticloud.v1.ListAwsClustersResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/awsClustersÖ +DeleteAwsCluster6.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.google.longrunning.Operation"kÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/awsClusters/*}‡ +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" ÊA + AwsNodePoolOperationMetadataÚA%parent,aws_node_pool,aws_node_pool_id‚Óä“O">/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools: aws_node_pool +UpdateAwsNodePool7.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.google.longrunning.Operation"¢ÊA + AwsNodePoolOperationMetadataÚAaws_node_pool,update_mask‚Óä“]2L/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}: aws_node_poolù +RollbackAwsNodePoolUpdate?.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest.google.longrunning.Operation"|ÊA + AwsNodePoolOperationMetadataÚAname‚Óä“L"G/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback:*Á +GetAwsNodePool4.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest*.google.cloud.gkemulticloud.v1.AwsNodePool"MÚAname‚Óä“@>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}Ô +ListAwsNodePools6.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest7.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"OÚAparent‚Óä“@>/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePoolsç +DeleteAwsNodePool7.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.google.longrunning.Operation"zÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“@*>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ß +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"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/awsServerConfig}PÊ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 000000000000..5666e4e33faa Binary files /dev/null and b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php differ 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..b6b507c9edfc --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php @@ -0,0 +1,175 @@ +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 (  + ignore_errors (BàA"ä +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 (  + ignore_errors (BàA"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"ÊA + AzureClientOperationMetadataÚA#parent,azure_client,azure_client_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/azureClients: azure_client³ +GetAzureClient4.google.cloud.gkemulticloud.v1.GetAzureClientRequest*.google.cloud.gkemulticloud.v1.AzureClient"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/azureClients/*}Æ +ListAzureClients6.google.cloud.gkemulticloud.v1.ListAzureClientsRequest7.google.cloud.gkemulticloud.v1.ListAzureClientsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/azureClientsÙ +DeleteAzureClient7.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.google.longrunning.Operation"lÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/azureClients/*}„ +CreateAzureCluster8.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.google.longrunning.Operation"”ÊA! + AzureClusterOperationMetadataÚA%parent,azure_cluster,azure_cluster_id‚Óä“B"1/v1/{parent=projects/*/locations/*}/azureClusters: azure_cluster† +UpdateAzureCluster8.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.google.longrunning.Operation"–ÊA! + AzureClusterOperationMetadataÚAazure_cluster,update_mask‚Óä“P2?/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}: azure_cluster· +GetAzureCluster5.google.cloud.gkemulticloud.v1.GetAzureClusterRequest+.google.cloud.gkemulticloud.v1.AzureCluster"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/azureClusters/*}Ê +ListAzureClusters7.google.cloud.gkemulticloud.v1.ListAzureClustersRequest8.google.cloud.gkemulticloud.v1.ListAzureClustersResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*}/azureClustersÜ +DeleteAzureCluster8.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.google.longrunning.Operation"mÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“3*1/v1/{name=projects/*/locations/*/azureClusters/*}“ +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"¬ÊA" + AzureNodePoolOperationMetadataÚA)parent,azure_node_pool,azure_node_pool_id‚Óä“U"B/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools:azure_node_pool  +UpdateAzureNodePool9.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.google.longrunning.Operation"®ÊA" + AzureNodePoolOperationMetadataÚAazure_node_pool,update_mask‚Óä“e2R/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}:azure_node_poolË +GetAzureNodePool6.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest,.google.cloud.gkemulticloud.v1.AzureNodePool"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}Þ +ListAzureNodePools8.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest9.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePoolsï +DeleteAzureNodePool9.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.google.longrunning.Operation"~ÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“D*B/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ù +GetAzureOpenIdConfig:.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest0.google.cloud.gkemulticloud.v1.AzureOpenIdConfig"sÚA azure_cluster‚Óä“][/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configurationÚ +GetAzureJsonWebKeys9.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest/.google.cloud.gkemulticloud.v1.AzureJsonWebKeys"WÚA azure_cluster‚Óä“A?/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwksÈ +GetAzureServerConfig:.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest0.google.cloud.gkemulticloud.v1.AzureServerConfig"BÚAname‚Óä“53/v1/{name=projects/*/locations/*/azureServerConfig}PÊ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 000000000000..2906d2a4d1df Binary files /dev/null and b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php differ diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php new file mode 100644 index 000000000000..1a479d207771 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php @@ -0,0 +1,1083 @@ +google.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; + /** + * Optional. Security Posture configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $security_posture_config = null; + /** + * Optional. Input only. Tag keys/values directly bound to this resource. + * Tag key must be specified in the format / + * where the tag namespace is the ID of the organization or name of the + * project that the tag key is defined in. + * The short name of a tag key or value can have a maximum length of 256 + * characters. The permitted character set for the short name includes UTF-8 + * encoded Unicode characters except single quotes ('), double quotes ("), + * backslashes (\), and forward slashes (/). + * See + * [Tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview) + * for more details on Google Cloud Platform tags. + * + * Generated from protobuf field map tags = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + private $tags; + + /** + * 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. + * @type \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig $security_posture_config + * Optional. Security Posture configuration for this cluster. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Input only. Tag keys/values directly bound to this resource. + * Tag key must be specified in the format / + * where the tag namespace is the ID of the organization or name of the + * project that the tag key is defined in. + * The short name of a tag key or value can have a maximum length of 256 + * characters. The permitted character set for the short name includes UTF-8 + * encoded Unicode characters except single quotes ('), double quotes ("), + * backslashes (\), and forward slashes (/). + * See + * [Tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview) + * for more details on Google Cloud Platform tags. + * } + */ + 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; + } + + /** + * Optional. Security Posture configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig|null + */ + public function getSecurityPostureConfig() + { + return $this->security_posture_config; + } + + public function hasSecurityPostureConfig() + { + return isset($this->security_posture_config); + } + + public function clearSecurityPostureConfig() + { + unset($this->security_posture_config); + } + + /** + * Optional. Security Posture configuration for this cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig $var + * @return $this + */ + public function setSecurityPostureConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig::class); + $this->security_posture_config = $var; + + return $this; + } + + /** + * Optional. Input only. Tag keys/values directly bound to this resource. + * Tag key must be specified in the format / + * where the tag namespace is the ID of the organization or name of the + * project that the tag key is defined in. + * The short name of a tag key or value can have a maximum length of 256 + * characters. The permitted character set for the short name includes UTF-8 + * encoded Unicode characters except single quotes ('), double quotes ("), + * backslashes (\), and forward slashes (/). + * See + * [Tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview) + * for more details on Google Cloud Platform tags. + * + * Generated from protobuf field map tags = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Input only. Tag keys/values directly bound to this resource. + * Tag key must be specified in the format / + * where the tag namespace is the ID of the organization or name of the + * project that the tag key is defined in. + * The short name of a tag key or value can have a maximum length of 256 + * characters. The permitted character set for the short name includes UTF-8 + * encoded Unicode characters except single quotes ('), double quotes ("), + * backslashes (\), and forward slashes (/). + * See + * [Tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview) + * for more details on Google Cloud Platform tags. + * + * Generated from protobuf field map tags = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @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; + } + +} + 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..bc60bc6cf7ab --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php @@ -0,0 +1,101 @@ +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 + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/eks/how-to/use-a-proxy#configure-proxy-support + * for EKS clusters and + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/aks/how-to/use-a-proxy#configure-proxy-support + * for AKS clusters. + * + * 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 + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/eks/how-to/use-a-proxy#configure-proxy-support + * for EKS clusters and + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/aks/how-to/use-a-proxy#configure-proxy-support + * for AKS clusters. + * } + */ + 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 + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/eks/how-to/use-a-proxy#configure-proxy-support + * for EKS clusters and + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/aks/how-to/use-a-proxy#configure-proxy-support + * for AKS clusters. + * + * 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 + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/eks/how-to/use-a-proxy#configure-proxy-support + * for EKS clusters and + * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/aks/how-to/use-a-proxy#configure-proxy-support + * for AKS clusters. + * + * 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..9b48cad7dd0b --- /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 instance profile to assign 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 instance profile to assign 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 instance profile to assign 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 instance profile to assign 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..7ece9f98386a --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php @@ -0,0 +1,771 @@ +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. Node kubelet configs. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeKubeletConfig kubelet_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kubelet_config = 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\NodeKubeletConfig $kubelet_config + * Optional. Node kubelet configs. + * @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. Node kubelet configs. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeKubeletConfig kubelet_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig|null + */ + public function getKubeletConfig() + { + return $this->kubelet_config; + } + + public function hasKubeletConfig() + { + return isset($this->kubelet_config); + } + + public function clearKubeletConfig() + { + unset($this->kubelet_config); + } + + /** + * Optional. Node kubelet configs. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeKubeletConfig kubelet_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig $var + * @return $this + */ + public function setKubeletConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig::class); + $this->kubelet_config = $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..25712e08c4ae --- /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/kubernetes-engine/multi-cloud/docs/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/kubernetes-engine/multi-cloud/docs/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/kubernetes-engine/multi-cloud/docs/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/kubernetes-engine/multi-cloud/docs/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..18b6b84acf57 --- /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/kubernetes-engine/multi-cloud/docs/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/kubernetes-engine/multi-cloud/docs/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/kubernetes-engine/multi-cloud/docs/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/kubernetes-engine/multi-cloud/docs/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/CloudMonitoringConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CloudMonitoringConfig.php new file mode 100644 index 000000000000..ccadb7a3993c --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CloudMonitoringConfig.php @@ -0,0 +1,83 @@ +google.cloud.gkemulticloud.v1.CloudMonitoringConfig + */ +class CloudMonitoringConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Enable GKE-native logging and metrics. + * Only for Attached Clusters. + * + * Generated from protobuf field optional bool enabled = 1; + */ + protected $enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Enable GKE-native logging and metrics. + * Only for Attached Clusters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Enable GKE-native logging and metrics. + * Only for Attached Clusters. + * + * Generated from protobuf field optional bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return isset($this->enabled) ? $this->enabled : false; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Enable GKE-native logging and metrics. + * Only for Attached Clusters. + * + * Generated from protobuf field optional 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/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..4d3907269d12 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php @@ -0,0 +1,288 @@ +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 = ''; + /** + * Optional. If set to true, the deletion of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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; + + /** + * @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. + * @type bool $ignore_errors + * Optional. If set to true, the deletion of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will + * succeed even if errors occur during deleting in cluster resources. Using + * this parameter may result in orphaned resources in the cluster. + * } + */ + 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; + } + + /** + * Optional. If set to true, the deletion of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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 + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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; + } + +} + 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..a27b26f73fd0 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php @@ -0,0 +1,296 @@ +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 = ''; + /** + * Optional. If set to true, the deletion of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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; + + /** + * @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. + * @type bool $ignore_errors + * Optional. If set to true, the deletion of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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. + * } + */ + 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; + } + + /** + * Optional. If set to true, the deletion of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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 + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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; + } + +} + 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..75a740ad73d9 --- /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..58f15ee6285f --- /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", "generic"]. + * + * 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", "generic"]. + * @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", "generic"]. + * + * 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", "generic"]. + * + * 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..e24a5cef4ce1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php @@ -0,0 +1,125 @@ +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; + /** + * Optionally enable GKE metrics. + * Only for Attached Clusters. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.CloudMonitoringConfig cloud_monitoring_config = 4; + */ + protected $cloud_monitoring_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. + * @type \Google\Cloud\GkeMultiCloud\V1\CloudMonitoringConfig $cloud_monitoring_config + * Optionally enable GKE metrics. + * Only for Attached Clusters. + * } + */ + 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; + } + + /** + * Optionally enable GKE metrics. + * Only for Attached Clusters. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.CloudMonitoringConfig cloud_monitoring_config = 4; + * @return \Google\Cloud\GkeMultiCloud\V1\CloudMonitoringConfig|null + */ + public function getCloudMonitoringConfig() + { + return $this->cloud_monitoring_config; + } + + public function hasCloudMonitoringConfig() + { + return isset($this->cloud_monitoring_config); + } + + public function clearCloudMonitoringConfig() + { + unset($this->cloud_monitoring_config); + } + + /** + * Optionally enable GKE metrics. + * Only for Attached Clusters. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.CloudMonitoringConfig cloud_monitoring_config = 4; + * @param \Google\Cloud\GkeMultiCloud\V1\CloudMonitoringConfig $var + * @return $this + */ + public function setCloudMonitoringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\CloudMonitoringConfig::class); + $this->cloud_monitoring_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeKubeletConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeKubeletConfig.php new file mode 100644 index 000000000000..12e9c4b56475 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeKubeletConfig.php @@ -0,0 +1,335 @@ +google.cloud.gkemulticloud.v1.NodeKubeletConfig + */ +class NodeKubeletConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Enable the insecure kubelet read only port. + * + * Generated from protobuf field bool insecure_kubelet_readonly_port_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $insecure_kubelet_readonly_port_enabled = false; + /** + * Optional. Control the CPU management policy on the node. + * See + * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ + * The following values are allowed. + * * "none": the default, which represents the existing scheduling behavior. + * * "static": allows pods with certain resource characteristics to be granted + * increased CPU affinity and exclusivity on the node. + * The default value is 'none' if unspecified. + * + * Generated from protobuf field optional string cpu_manager_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu_manager_policy = null; + /** + * Optional. Enable CPU CFS quota enforcement for containers that specify CPU + * limits. + * This option is enabled by default which makes kubelet use CFS quota + * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to + * enforce container CPU limits. Otherwise, CPU limits will not be enforced at + * all. + * Disable this option to mitigate CPU throttling problems while still having + * your pods to be in Guaranteed QoS class by specifying the CPU limits. + * The default value is 'true' if unspecified. + * + * Generated from protobuf field optional bool cpu_cfs_quota = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu_cfs_quota = null; + /** + * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. + * The string must be a sequence of decimal numbers, each with optional + * fraction and a unit suffix, such as "300ms". + * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + * The value must be a positive duration. + * The default value is '100ms' if unspecified. + * + * Generated from protobuf field optional string cpu_cfs_quota_period = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu_cfs_quota_period = null; + /** + * Optional. Set the Pod PID limits. See + * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits + * Controls the maximum number of processes allowed to run in a pod. The value + * must be greater than or equal to 1024 and less than 4194304. + * + * Generated from protobuf field optional int64 pod_pids_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pod_pids_limit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $insecure_kubelet_readonly_port_enabled + * Optional. Enable the insecure kubelet read only port. + * @type string $cpu_manager_policy + * Optional. Control the CPU management policy on the node. + * See + * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ + * The following values are allowed. + * * "none": the default, which represents the existing scheduling behavior. + * * "static": allows pods with certain resource characteristics to be granted + * increased CPU affinity and exclusivity on the node. + * The default value is 'none' if unspecified. + * @type bool $cpu_cfs_quota + * Optional. Enable CPU CFS quota enforcement for containers that specify CPU + * limits. + * This option is enabled by default which makes kubelet use CFS quota + * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to + * enforce container CPU limits. Otherwise, CPU limits will not be enforced at + * all. + * Disable this option to mitigate CPU throttling problems while still having + * your pods to be in Guaranteed QoS class by specifying the CPU limits. + * The default value is 'true' if unspecified. + * @type string $cpu_cfs_quota_period + * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. + * The string must be a sequence of decimal numbers, each with optional + * fraction and a unit suffix, such as "300ms". + * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + * The value must be a positive duration. + * The default value is '100ms' if unspecified. + * @type int|string $pod_pids_limit + * Optional. Set the Pod PID limits. See + * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits + * Controls the maximum number of processes allowed to run in a pod. The value + * must be greater than or equal to 1024 and less than 4194304. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Enable the insecure kubelet read only port. + * + * Generated from protobuf field bool insecure_kubelet_readonly_port_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInsecureKubeletReadonlyPortEnabled() + { + return $this->insecure_kubelet_readonly_port_enabled; + } + + /** + * Optional. Enable the insecure kubelet read only port. + * + * Generated from protobuf field bool insecure_kubelet_readonly_port_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInsecureKubeletReadonlyPortEnabled($var) + { + GPBUtil::checkBool($var); + $this->insecure_kubelet_readonly_port_enabled = $var; + + return $this; + } + + /** + * Optional. Control the CPU management policy on the node. + * See + * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ + * The following values are allowed. + * * "none": the default, which represents the existing scheduling behavior. + * * "static": allows pods with certain resource characteristics to be granted + * increased CPU affinity and exclusivity on the node. + * The default value is 'none' if unspecified. + * + * Generated from protobuf field optional string cpu_manager_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCpuManagerPolicy() + { + return isset($this->cpu_manager_policy) ? $this->cpu_manager_policy : ''; + } + + public function hasCpuManagerPolicy() + { + return isset($this->cpu_manager_policy); + } + + public function clearCpuManagerPolicy() + { + unset($this->cpu_manager_policy); + } + + /** + * Optional. Control the CPU management policy on the node. + * See + * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ + * The following values are allowed. + * * "none": the default, which represents the existing scheduling behavior. + * * "static": allows pods with certain resource characteristics to be granted + * increased CPU affinity and exclusivity on the node. + * The default value is 'none' if unspecified. + * + * Generated from protobuf field optional string cpu_manager_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCpuManagerPolicy($var) + { + GPBUtil::checkString($var, True); + $this->cpu_manager_policy = $var; + + return $this; + } + + /** + * Optional. Enable CPU CFS quota enforcement for containers that specify CPU + * limits. + * This option is enabled by default which makes kubelet use CFS quota + * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to + * enforce container CPU limits. Otherwise, CPU limits will not be enforced at + * all. + * Disable this option to mitigate CPU throttling problems while still having + * your pods to be in Guaranteed QoS class by specifying the CPU limits. + * The default value is 'true' if unspecified. + * + * Generated from protobuf field optional bool cpu_cfs_quota = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getCpuCfsQuota() + { + return isset($this->cpu_cfs_quota) ? $this->cpu_cfs_quota : false; + } + + public function hasCpuCfsQuota() + { + return isset($this->cpu_cfs_quota); + } + + public function clearCpuCfsQuota() + { + unset($this->cpu_cfs_quota); + } + + /** + * Optional. Enable CPU CFS quota enforcement for containers that specify CPU + * limits. + * This option is enabled by default which makes kubelet use CFS quota + * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to + * enforce container CPU limits. Otherwise, CPU limits will not be enforced at + * all. + * Disable this option to mitigate CPU throttling problems while still having + * your pods to be in Guaranteed QoS class by specifying the CPU limits. + * The default value is 'true' if unspecified. + * + * Generated from protobuf field optional bool cpu_cfs_quota = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setCpuCfsQuota($var) + { + GPBUtil::checkBool($var); + $this->cpu_cfs_quota = $var; + + return $this; + } + + /** + * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. + * The string must be a sequence of decimal numbers, each with optional + * fraction and a unit suffix, such as "300ms". + * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + * The value must be a positive duration. + * The default value is '100ms' if unspecified. + * + * Generated from protobuf field optional string cpu_cfs_quota_period = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCpuCfsQuotaPeriod() + { + return isset($this->cpu_cfs_quota_period) ? $this->cpu_cfs_quota_period : ''; + } + + public function hasCpuCfsQuotaPeriod() + { + return isset($this->cpu_cfs_quota_period); + } + + public function clearCpuCfsQuotaPeriod() + { + unset($this->cpu_cfs_quota_period); + } + + /** + * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. + * The string must be a sequence of decimal numbers, each with optional + * fraction and a unit suffix, such as "300ms". + * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + * The value must be a positive duration. + * The default value is '100ms' if unspecified. + * + * Generated from protobuf field optional string cpu_cfs_quota_period = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCpuCfsQuotaPeriod($var) + { + GPBUtil::checkString($var, True); + $this->cpu_cfs_quota_period = $var; + + return $this; + } + + /** + * Optional. Set the Pod PID limits. See + * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits + * Controls the maximum number of processes allowed to run in a pod. The value + * must be greater than or equal to 1024 and less than 4194304. + * + * Generated from protobuf field optional int64 pod_pids_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getPodPidsLimit() + { + return isset($this->pod_pids_limit) ? $this->pod_pids_limit : 0; + } + + public function hasPodPidsLimit() + { + return isset($this->pod_pids_limit); + } + + public function clearPodPidsLimit() + { + unset($this->pod_pids_limit); + } + + /** + * Optional. Set the Pod PID limits. See + * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits + * Controls the maximum number of processes allowed to run in a pod. The value + * must be greater than or equal to 1024 and less than 4194304. + * + * Generated from protobuf field optional int64 pod_pids_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setPodPidsLimit($var) + { + GPBUtil::checkInt64($var); + $this->pod_pids_limit = $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..e28118d3c762 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php @@ -0,0 +1,319 @@ +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 + * [google.longrunning.Operation.error][google.longrunning.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 + * [google.longrunning.Operation.error][google.longrunning.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 + * [google.longrunning.Operation.error][google.longrunning.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 + * [google.longrunning.Operation.error][google.longrunning.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/SecurityPostureConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig.php new file mode 100644 index 000000000000..58591f498820 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig.php @@ -0,0 +1,68 @@ +google.cloud.gkemulticloud.v1.SecurityPostureConfig + */ +class SecurityPostureConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Sets which mode to use for vulnerability scanning. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 1; + */ + protected $vulnerability_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $vulnerability_mode + * Sets which mode to use for vulnerability scanning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Sets which mode to use for vulnerability scanning. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 1; + * @return int + */ + public function getVulnerabilityMode() + { + return $this->vulnerability_mode; + } + + /** + * Sets which mode to use for vulnerability scanning. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 1; + * @param int $var + * @return $this + */ + public function setVulnerabilityMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig\VulnerabilityMode::class); + $this->vulnerability_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig/VulnerabilityMode.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig/VulnerabilityMode.php new file mode 100644 index 000000000000..d9277afa64f1 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig/VulnerabilityMode.php @@ -0,0 +1,65 @@ +google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode + */ +class VulnerabilityMode +{ + /** + * Default value not specified. + * + * Generated from protobuf enum VULNERABILITY_MODE_UNSPECIFIED = 0; + */ + const VULNERABILITY_MODE_UNSPECIFIED = 0; + /** + * Disables vulnerability scanning on the cluster. + * + * Generated from protobuf enum VULNERABILITY_DISABLED = 1; + */ + const VULNERABILITY_DISABLED = 1; + /** + * Applies the Security Posture's vulnerability on cluster Enterprise level + * features. + * + * Generated from protobuf enum VULNERABILITY_ENTERPRISE = 2; + */ + const VULNERABILITY_ENTERPRISE = 2; + + private static $valueToName = [ + self::VULNERABILITY_MODE_UNSPECIFIED => 'VULNERABILITY_MODE_UNSPECIFIED', + self::VULNERABILITY_DISABLED => 'VULNERABILITY_DISABLED', + self::VULNERABILITY_ENTERPRISE => 'VULNERABILITY_ENTERPRISE', + ]; + + 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(VulnerabilityMode::class, \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig_VulnerabilityMode::class); + 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..bf5a80e837a7 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php @@ -0,0 +1,256 @@ +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`. + * * `security_posture_config.vulnerability_mode` + * * `monitoring_config.cloud_monitoring_config.enabled` + * + * 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`. + * * `security_posture_config.vulnerability_mode` + * * `monitoring_config.cloud_monitoring_config.enabled` + * + * @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`. + * * `security_posture_config.vulnerability_mode` + * * `monitoring_config.cloud_monitoring_config.enabled` + * } + */ + 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`. + * * `security_posture_config.vulnerability_mode` + * * `monitoring_config.cloud_monitoring_config.enabled` + * + * 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`. + * * `security_posture_config.vulnerability_mode` + * * `monitoring_config.cloud_monitoring_config.enabled` + * + * 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..2a7f4e8cf125 --- /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..888831ecfe49 --- /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..f634bac8abba --- /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..25a8c696f2aa --- /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..3ea3df7aaa6a --- /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..badf6e3174e2 --- /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..712b6d9696ee --- /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", "generic"]. + */ +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..cf6a804b097a --- /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..775de69e03c5 --- /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..3a9b95414e61 --- /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..6700d354ef3f --- /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 instance profile to assign 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..bc125bb49cf4 --- /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..f044619a8fc8 --- /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..ac8d7cb0a8f3 --- /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..2cd43f2f61dd --- /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..cfd25ce7aeab --- /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..ba7d7f2816ca --- /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..688fed51b381 --- /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..73786a12989b --- /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..482a745a9739 --- /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..bd79cd367fb1 --- /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..1ff4a2398e6b --- /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..698a8ebf267e --- /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..f2eaf0fc0f23 --- /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..86596a028c26 --- /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..65d4568cb24c --- /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..af4df235b0f0 --- /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..c3b0d05664d9 --- /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..6eb188b38a44 --- /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..0c6925d61a43 --- /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..e05c6797f0bf --- /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..33ec265dfb71 --- /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..b5495e9022ac --- /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..34c0643e066a --- /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..501d4d5ce66c --- /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..3e57551f73dd --- /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..406a72739b75 --- /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..3904ed21c9a6 --- /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..742898183e3d --- /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..0d0c91cbd976 --- /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..d5c8d70f43c3 --- /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..858839f9d107 --- /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..fc418a4e898c --- /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..54e20c988327 --- /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/Client/AttachedClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php new file mode 100644 index 000000000000..4c86e0776f49 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php @@ -0,0 +1,595 @@ + 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 = []) + * @method PromiseInterface importAttachedClusterAsync(ImportAttachedClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttachedClustersAsync(ListAttachedClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAttachedClusterAsync(UpdateAttachedClusterRequest $request, array $optionalArgs = []) + */ +final class AttachedClustersClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AttachedClusters'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private 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. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + 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', + ], + ], + ]; + } + + /** + * 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * 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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @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..617e0d1988d3 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php @@ -0,0 +1,825 @@ + createAwsClusterAsync(CreateAwsClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAwsNodePoolAsync(CreateAwsNodePoolRequest $request, array $optionalArgs = []) + * @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 = []) + */ +final class AwsClustersClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AwsClusters'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private 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. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + 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', + ], + ], + ]; + } + + /** + * 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * 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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @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..a889dd63200e --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php @@ -0,0 +1,945 @@ + createAzureClientAsync(CreateAzureClientRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAzureClusterAsync(CreateAzureClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAzureNodePoolAsync(CreateAzureNodePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAzureClientAsync(DeleteAzureClientRequest $request, array $optionalArgs = []) + * @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 = []) + * @method PromiseInterface listAzureNodePoolsAsync(ListAzureNodePoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAzureClusterAsync(UpdateAzureClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAzureNodePoolAsync(UpdateAzureNodePoolRequest $request, array $optionalArgs = []) + */ +final class AzureClustersClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AzureClusters'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private 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. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + 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', + ], + ], + ]; + } + + /** + * 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * 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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @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_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..bcf067438c50 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php @@ -0,0 +1,178 @@ + [ + '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..4fd82e21dcb5 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php @@ -0,0 +1,185 @@ + [ + '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..974dcecc0d70 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php @@ -0,0 +1,293 @@ + [ + '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..1881687ada72 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php @@ -0,0 +1,271 @@ + [ + '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..3fea9a96d457 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php @@ -0,0 +1,345 @@ + [ + '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..9ebff8d3a0f2 --- /dev/null +++ b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php @@ -0,0 +1,307 @@ + [ + '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/Client/AttachedClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php new file mode 100644 index 000000000000..ae0ddafe5613 --- /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..b582a56dd038 --- /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..33291fc493e8 --- /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()); + } +}