diff --git a/GkeMultiCloud/metadata/V1/AttachedResources.php b/GkeMultiCloud/metadata/V1/AttachedResources.php new file mode 100644 index 000000000000..8f1647b3e2c6 Binary files /dev/null and b/GkeMultiCloud/metadata/V1/AttachedResources.php differ diff --git a/GkeMultiCloud/metadata/V1/AttachedService.php b/GkeMultiCloud/metadata/V1/AttachedService.php new file mode 100644 index 000000000000..70e751523d92 --- /dev/null +++ b/GkeMultiCloud/metadata/V1/AttachedService.php @@ -0,0 +1,89 @@ +internalAddGeneratedFile( + ' +ì +4google/cloud/gkemulticloud/v1/attached_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/gkemulticloud/v1/attached_resources.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"¶ +-GenerateAttachedClusterInstallManifestRequestD +parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster +attached_cluster_id ( BàA +platform_version ( Bà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à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/AttachedServerConfig2µ +AttachedClusters™ +CreateAttachedCluster;.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.google.longrunning.Operation"£‚Óä“H"4/v1/{parent=projects/*/locations/*}/attachedClusters:attached_clusterÚA+parent,attached_cluster,attached_cluster_idÊA$ +AttachedClusterOperationMetadata› +UpdateAttachedCluster;.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.google.longrunning.Operation"¥‚Óä“Y2E/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}:attached_clusterÚAattached_cluster,update_maskÊA$ +AttachedClusterOperationMetadataý +ImportAttachedCluster;.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.google.longrunning.Operation"‡‚Óä“@";/v1/{parent=projects/*/locations/*}/attachedClusters:import:*ÚAparent,fleet_membershipÊA$ +AttachedClusterOperationMetadataà +GetAttachedCluster8.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest..google.cloud.gkemulticloud.v1.AttachedCluster"C‚Óä“64/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÖ +ListAttachedClusters:.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse"E‚Óä“64/v1/{parent=projects/*/locations/*}/attachedClustersÚAparentå +DeleteAttachedCluster;.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.google.longrunning.Operation"p‚Óä“6*4/v1/{name=projects/*/locations/*/attachedClusters/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataÔ +GetAttachedServerConfig=.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest3.google.cloud.gkemulticloud.v1.AttachedServerConfig"E‚Óä“86/v1/{name=projects/*/locations/*/attachedServerConfig}ÚAname¶ +&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"o‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifestÚAparent,attached_cluster_idPÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBê +!com.google.cloud.gkemulticloud.v1BAttachedServiceProtoPZJgoogle.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloudªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/GkeMultiCloud/metadata/V1/AwsResources.php b/GkeMultiCloud/metadata/V1/AwsResources.php index d54e0680a6d8..1f0d035c6472 100644 Binary files a/GkeMultiCloud/metadata/V1/AwsResources.php and b/GkeMultiCloud/metadata/V1/AwsResources.php differ diff --git a/GkeMultiCloud/metadata/V1/AzureResources.php b/GkeMultiCloud/metadata/V1/AzureResources.php index a73b557a5416..5f0ffa7e86d1 100644 Binary files a/GkeMultiCloud/metadata/V1/AzureResources.php and b/GkeMultiCloud/metadata/V1/AzureResources.php differ diff --git a/GkeMultiCloud/metadata/V1/CommonResources.php b/GkeMultiCloud/metadata/V1/CommonResources.php index 1fc85ae53250..c405f78106ee 100644 Binary files a/GkeMultiCloud/metadata/V1/CommonResources.php and b/GkeMultiCloud/metadata/V1/CommonResources.php differ diff --git a/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php new file mode 100644 index 000000000000..8cd0df097d13 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/create_attached_cluster.php @@ -0,0 +1,144 @@ +/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"]. + * @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 any non-scalar elements to be passed along with the request. + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedClusterFleet = (new Fleet()) + ->setProject($attachedClusterFleetProject); + $attachedCluster = (new AttachedCluster()) + ->setOidcConfig($attachedClusterOidcConfig) + ->setPlatformVersion($attachedClusterPlatformVersion) + ->setDistribution($attachedClusterDistribution) + ->setFleet($attachedClusterFleet); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->createAttachedCluster( + $formattedParent, + $attachedCluster, + $attachedClusterId + ); + $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/GkeMultiCloud/samples/V1/AttachedClustersClient/delete_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/delete_attached_cluster.php new file mode 100644 index 000000000000..b2e90f5c8524 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/delete_attached_cluster.php @@ -0,0 +1,91 @@ +/locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP 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(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->deleteAttachedCluster($formattedName); + $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/GkeMultiCloud/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php new file mode 100644 index 000000000000..42cfd36e46f2 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php @@ -0,0 +1,106 @@ +/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 the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * @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(); + + // Call the API and handle any network failures. + try { + /** @var GenerateAttachedClusterInstallManifestResponse $response */ + $response = $attachedClustersClient->generateAttachedClusterInstallManifest( + $formattedParent, + $attachedClusterId, + $platformVersion + ); + 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/GkeMultiCloud/samples/V1/AttachedClustersClient/get_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/get_attached_cluster.php new file mode 100644 index 000000000000..75db7d823f01 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/get_attached_cluster.php @@ -0,0 +1,79 @@ +/locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP 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(); + + // Call the API and handle any network failures. + try { + /** @var AttachedCluster $response */ + $response = $attachedClustersClient->getAttachedCluster($formattedName); + 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/GkeMultiCloud/samples/V1/AttachedClustersClient/get_attached_server_config.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/get_attached_server_config.php new file mode 100644 index 000000000000..44cc44fa2497 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/get_attached_server_config.php @@ -0,0 +1,75 @@ +/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(); + + // Call the API and handle any network failures. + try { + /** @var AttachedServerConfig $response */ + $response = $attachedClustersClient->getAttachedServerConfig($formattedName); + 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/GkeMultiCloud/samples/V1/AttachedClustersClient/import_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/import_attached_cluster.php new file mode 100644 index 000000000000..59c385b8c57e --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/import_attached_cluster.php @@ -0,0 +1,115 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. Please see + * {@see AttachedClustersClient::locationName()} for help formatting this field. + * @param string $fleetMembership The name of the fleet membership resource to import. + * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param string $distribution The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks"]. + */ +function import_attached_cluster_sample( + string $formattedParent, + string $fleetMembership, + string $platformVersion, + string $distribution +): void { + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->importAttachedCluster( + $formattedParent, + $fleetMembership, + $platformVersion, + $distribution + ); + $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/GkeMultiCloud/samples/V1/AttachedClustersClient/list_attached_clusters.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/list_attached_clusters.php new file mode 100644 index 000000000000..5ced1a731838 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/list_attached_clusters.php @@ -0,0 +1,78 @@ +/locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP 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(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $attachedClustersClient->listAttachedClusters($formattedParent); + + /** @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/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php b/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php new file mode 100644 index 000000000000..0675297730e3 --- /dev/null +++ b/GkeMultiCloud/samples/V1/AttachedClustersClient/update_attached_cluster.php @@ -0,0 +1,113 @@ +`. + */ +function update_attached_cluster_sample( + string $attachedClusterPlatformVersion, + string $attachedClusterDistribution, + string $attachedClusterFleetProject +): void { + // Create a client. + $attachedClustersClient = new AttachedClustersClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedClusterFleet = (new Fleet()) + ->setProject($attachedClusterFleetProject); + $attachedCluster = (new AttachedCluster()) + ->setOidcConfig($attachedClusterOidcConfig) + ->setPlatformVersion($attachedClusterPlatformVersion) + ->setDistribution($attachedClusterDistribution) + ->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); + $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/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php b/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php index 2e3bf344a843..499c96199bd4 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_cluster.php @@ -34,17 +34,20 @@ use Google\Cloud\GkeMultiCloud\V1\AwsControlPlane; use Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption; use Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication; +use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Rpc\Status; /** - * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource on a given GCP project and region. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedParent The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource - * will be created. + * @param string $formattedParent The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. * * Location names are formatted as `projects//locations/`. * @@ -55,12 +58,12 @@ * (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 $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. @@ -77,21 +80,27 @@ * 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 $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 $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. * @param string $awsClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. - * @param string $awsClusterId A client provided ID the resource. Must be unique within the parent - * resource. + * @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 + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as * `projects//locations//awsClusters/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ function create_aws_cluster_sample( string $formattedParent, @@ -106,6 +115,7 @@ function create_aws_cluster_sample( string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, string $awsClusterAuthorizationAdminUsersUsername, + string $awsClusterFleetProject, string $awsClusterId ): void { // Create a client. @@ -139,11 +149,14 @@ function create_aws_cluster_sample( $awsClusterAuthorizationAdminUsers = [$awsClusterUser,]; $awsClusterAuthorization = (new AwsAuthorization()) ->setAdminUsers($awsClusterAuthorizationAdminUsers); + $awsClusterFleet = (new Fleet()) + ->setProject($awsClusterFleetProject); $awsCluster = (new AwsCluster()) ->setNetworking($awsClusterNetworking) ->setAwsRegion($awsClusterAwsRegion) ->setControlPlane($awsClusterControlPlane) - ->setAuthorization($awsClusterAuthorization); + ->setAuthorization($awsClusterAuthorization) + ->setFleet($awsClusterFleet); // Call the API and handle any network failures. try { @@ -188,6 +201,7 @@ function callSample(): void $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; $awsClusterAuthorizationAdminUsersUsername = '[USERNAME]'; + $awsClusterFleetProject = '[PROJECT]'; $awsClusterId = '[AWS_CLUSTER_ID]'; create_aws_cluster_sample( @@ -203,6 +217,7 @@ function callSample(): void $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, $awsClusterControlPlaneConfigEncryptionKmsKeyArn, $awsClusterAuthorizationAdminUsersUsername, + $awsClusterFleetProject, $awsClusterId ); } diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_node_pool.php b/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_node_pool.php index 19c648baa397..b97d31d03933 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_node_pool.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/create_aws_node_pool.php @@ -34,13 +34,15 @@ use Google\Rpc\Status; /** - * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedParent The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + * @param string $formattedParent The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -48,27 +50,30 @@ * 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`). + * @param string $awsNodePoolVersion The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). * * You can list all supported versions on a given Google Cloud region by * calling * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the pool. + * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the + * pool. * @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or equal to - * 1 and less than or equal to max_node_count. - * @param int $awsNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or equal to - * min_node_count and less than or equal to 50. + * @param 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. + * @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 + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ function create_aws_node_pool_sample( string $formattedParent, diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_cluster.php b/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_cluster.php index 1816825cad13..90d9d3279498 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_cluster.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_cluster.php @@ -29,16 +29,18 @@ use Google\Rpc\Status; /** - * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. * - * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources. + * Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedName The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * @param string $formattedName The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_node_pool.php b/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_node_pool.php index 688dd46091c7..79fe862ddb01 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_node_pool.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/delete_aws_node_pool.php @@ -29,13 +29,15 @@ use Google\Rpc\Status; /** - * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedName The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * @param string $formattedName The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. * * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/generate_aws_access_token.php b/GkeMultiCloud/samples/V1/AwsClustersClient/generate_aws_access_token.php index a135ce3cb207..107c79ee7022 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/generate_aws_access_token.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/generate_aws_access_token.php @@ -31,7 +31,9 @@ * Generates a short-lived access token to authenticate to a given * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. * - * @param string $formattedAwsCluster The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + * @param string $formattedAwsCluster The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_cluster.php b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_cluster.php index 116854a3354b..8da5624ce66e 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_cluster.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_cluster.php @@ -28,9 +28,12 @@ use Google\Cloud\GkeMultiCloud\V1\AwsClustersClient; /** - * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. * - * @param string $formattedName The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + * @param string $formattedName The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_node_pool.php b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_node_pool.php index 621c324c835a..fb17d2ab126c 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_node_pool.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_node_pool.php @@ -28,9 +28,12 @@ use Google\Cloud\GkeMultiCloud\V1\AwsNodePool; /** - * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * Describes a specific + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. * - * @param string $formattedName The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + * @param string $formattedName The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. * * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_server_config.php b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_server_config.php index bbde91657180..9db146ac3794 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_server_config.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/get_aws_server_config.php @@ -31,7 +31,9 @@ * Returns information, such as supported AWS regions and Kubernetes * versions, on a given Google Cloud location. * - * @param string $formattedName The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + * @param string $formattedName The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. * * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_clusters.php b/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_clusters.php index e631ac243873..ee79000863e6 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_clusters.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_clusters.php @@ -29,8 +29,8 @@ use Google\Cloud\GkeMultiCloud\V1\AwsClustersClient; /** - * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and - * region. + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * on a given Google Cloud project and region. * * @param string $formattedParent The parent location which owns this collection of * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_node_pools.php b/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_node_pools.php index f2be3a1e8087..0da606e94859 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_node_pools.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/list_aws_node_pools.php @@ -29,7 +29,9 @@ use Google\Cloud\GkeMultiCloud\V1\AwsNodePool; /** - * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * * @param string $formattedParent The parent `AwsCluster` which owns this collection of * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php b/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php index 344dfc284995..ee96b446dede 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_cluster.php @@ -34,6 +34,7 @@ use Google\Cloud\GkeMultiCloud\V1\AwsControlPlane; use Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption; use Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication; +use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Protobuf\FieldMask; use Google\Rpc\Status; @@ -44,12 +45,12 @@ * (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 $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. @@ -66,13 +67,18 @@ * 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 $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 $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. * @param string $awsClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. + * @param string $awsClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. + * + * Project names are formatted as + * `projects/`. */ function update_aws_cluster_sample( string $awsClusterNetworkingVpcId, @@ -85,7 +91,8 @@ function update_aws_cluster_sample( string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterAuthorizationAdminUsersUsername + string $awsClusterAuthorizationAdminUsersUsername, + string $awsClusterFleetProject ): void { // Create a client. $awsClustersClient = new AwsClustersClient(); @@ -118,11 +125,14 @@ function update_aws_cluster_sample( $awsClusterAuthorizationAdminUsers = [$awsClusterUser,]; $awsClusterAuthorization = (new AwsAuthorization()) ->setAdminUsers($awsClusterAuthorizationAdminUsers); + $awsClusterFleet = (new Fleet()) + ->setProject($awsClusterFleetProject); $awsCluster = (new AwsCluster()) ->setNetworking($awsClusterNetworking) ->setAwsRegion($awsClusterAwsRegion) ->setControlPlane($awsClusterControlPlane) - ->setAuthorization($awsClusterAuthorization); + ->setAuthorization($awsClusterAuthorization) + ->setFleet($awsClusterFleet); $updateMask = new FieldMask(); // Call the API and handle any network failures. @@ -167,6 +177,7 @@ function callSample(): void $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; $awsClusterAuthorizationAdminUsersUsername = '[USERNAME]'; + $awsClusterFleetProject = '[PROJECT]'; update_aws_cluster_sample( $awsClusterNetworkingVpcId, @@ -179,7 +190,8 @@ function callSample(): void $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterAuthorizationAdminUsersUsername + $awsClusterAuthorizationAdminUsersUsername, + $awsClusterFleetProject ); } // [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync] diff --git a/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_node_pool.php b/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_node_pool.php index 8ef1f984fbb2..e17d2dfdf42c 100644 --- a/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_node_pool.php +++ b/GkeMultiCloud/samples/V1/AwsClustersClient/update_aws_node_pool.php @@ -37,17 +37,19 @@ /** * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. * - * @param string $awsNodePoolVersion The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). + * @param string $awsNodePoolVersion The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). * * You can list all supported versions on a given Google Cloud region by * calling * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the pool. + * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the + * pool. * @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or equal to - * 1 and less than or equal to max_node_count. - * @param int $awsNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or equal to - * min_node_count and less than or equal to 50. + * @param 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. */ diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_client.php b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_client.php index c1b6eb1ce029..b1add7f7bbdd 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_client.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_client.php @@ -30,8 +30,8 @@ use Google\Rpc\Status; /** - * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project - * and region. + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource on a given Google Cloud project and region. * * `AzureClient` resources hold client authentication * information needed by the Anthos Multicloud API to manage Azure resources @@ -41,8 +41,9 @@ * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedParent The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource - * will be created. + * @param string $formattedParent The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. * * Location names are formatted as `projects//locations/`. * @@ -51,14 +52,15 @@ * {@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. + * @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 + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as * `projects//locations//azureClients/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ function create_azure_client_sample( string $formattedParent, diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php index a3f01ada9e30..54d10e1350d5 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_cluster.php @@ -32,17 +32,20 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; use Google\Cloud\GkeMultiCloud\V1\AzureControlPlane; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; +use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Rpc\Status; /** - * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource on a given GCP project and region. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedParent The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource - * will be created. + * @param string $formattedParent The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. * * Location names are formatted as `projects//locations/`. * @@ -55,11 +58,13 @@ * 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: + * @param string $azureClusterResourceGroupId The ARM ID of the resource group where the cluster resources are + * deployed. For example: * `/subscriptions//resourceGroups/` - * @param string $azureClusterAzureClient Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - * how the Anthos Multi-Cloud API connects to Azure APIs. + * @param string $azureClusterAzureClient Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. * * The `AzureClient` resource must reside on the same GCP project and region * as the `AzureCluster`. @@ -69,8 +74,8 @@ * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with your - * cluster. + * @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. @@ -99,18 +104,24 @@ * 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 $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. * @param string $azureClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. - * @param string $azureClusterId A client provided ID the resource. Must be unique within the parent - * resource. + * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. * - * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource name formatted as + * 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 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ function create_azure_cluster_sample( string $formattedParent, @@ -123,6 +134,7 @@ function create_azure_cluster_sample( string $azureClusterControlPlaneVersion, string $azureClusterControlPlaneSshConfigAuthorizedKey, string $azureClusterAuthorizationAdminUsersUsername, + string $azureClusterFleetProject, string $azureClusterId ): void { // Create a client. @@ -149,13 +161,16 @@ function create_azure_cluster_sample( $azureClusterAuthorizationAdminUsers = [$azureClusterUser,]; $azureClusterAuthorization = (new AzureAuthorization()) ->setAdminUsers($azureClusterAuthorizationAdminUsers); + $azureClusterFleet = (new Fleet()) + ->setProject($azureClusterFleetProject); $azureCluster = (new AzureCluster()) ->setAzureRegion($azureClusterAzureRegion) ->setResourceGroupId($azureClusterResourceGroupId) ->setAzureClient($azureClusterAzureClient) ->setNetworking($azureClusterNetworking) ->setControlPlane($azureClusterControlPlane) - ->setAuthorization($azureClusterAuthorization); + ->setAuthorization($azureClusterAuthorization) + ->setFleet($azureClusterFleet); // Call the API and handle any network failures. try { @@ -202,6 +217,7 @@ function callSample(): void $azureClusterControlPlaneVersion = '[VERSION]'; $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; $azureClusterAuthorizationAdminUsersUsername = '[USERNAME]'; + $azureClusterFleetProject = '[PROJECT]'; $azureClusterId = '[AZURE_CLUSTER_ID]'; create_azure_cluster_sample( @@ -215,6 +231,7 @@ function callSample(): void $azureClusterControlPlaneVersion, $azureClusterControlPlaneSshConfigAuthorizedKey, $azureClusterAuthorizationAdminUsersUsername, + $azureClusterFleetProject, $azureClusterId ); } diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php index b2e33bb746d3..037860627c4f 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/create_azure_node_pool.php @@ -34,38 +34,43 @@ use Google\Rpc\Status; /** - * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + * attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedParent The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + * @param string $formattedParent The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. * * Location names are formatted as `projects//locations/`. * * 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 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. + * @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 + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ function create_azure_node_pool_sample( string $formattedParent, diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_client.php b/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_client.php index 4b3bc2393394..03dc723aaa18 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_client.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_client.php @@ -29,7 +29,8 @@ use Google\Rpc\Status; /** - * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource. * * If the client is used by one or more clusters, deletion will * fail and a `FAILED_PRECONDITION` error will be returned. @@ -38,9 +39,11 @@ * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedName The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * @param string $formattedName The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_cluster.php b/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_cluster.php index a750d4e1f0fc..4ecd65b8fa56 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_cluster.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_cluster.php @@ -29,16 +29,18 @@ use Google\Rpc\Status; /** - * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * Deletes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * - * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources. + * Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedName The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * @param string $formattedName The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. * * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_node_pool.php b/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_node_pool.php index 4af716946bb5..aff62d100ed7 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_node_pool.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/delete_azure_node_pool.php @@ -29,13 +29,15 @@ use Google\Rpc\Status; /** - * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * Deletes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be * described to track the status of the operation. * - * @param string $formattedName The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * @param string $formattedName The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. * * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php b/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php index 5665c9481e49..cfaf60fe58c9 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/generate_azure_access_token.php @@ -31,7 +31,9 @@ * Generates a short-lived access token to authenticate to a given * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * - * @param string $formattedAzureCluster The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + * @param string $formattedAzureCluster The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. * * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_client.php b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_client.php index 7145b362a534..23be24df6692 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_client.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_client.php @@ -28,11 +28,15 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; /** - * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * Describes a specific + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. * - * @param string $formattedName The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe. + * @param string $formattedName The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_cluster.php b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_cluster.php index e9e222a585f4..f56f988022c0 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_cluster.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_cluster.php @@ -28,9 +28,12 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; /** - * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * Describes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * - * @param string $formattedName The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + * @param string $formattedName The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. * * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_node_pool.php b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_node_pool.php index dc16a6c50880..cf546ffefc9d 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_node_pool.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_node_pool.php @@ -28,9 +28,12 @@ use Google\Cloud\GkeMultiCloud\V1\AzureNodePool; /** - * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * Describes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. * - * @param string $formattedName The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + * @param string $formattedName The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. * * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_server_config.php b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_server_config.php index 32ae5881d65b..1062f5f5739c 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_server_config.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/get_azure_server_config.php @@ -31,7 +31,9 @@ * Returns information, such as supported Azure regions and Kubernetes * versions, on a given Google Cloud location. * - * @param string $formattedName The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + * @param string $formattedName The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. * * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clients.php b/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clients.php index c1202b81b9e6..3323eb37deb6 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clients.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clients.php @@ -29,8 +29,8 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; /** - * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and - * region. + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources on a given Google Cloud project and region. * * @param string $formattedParent The parent location which owns this collection of * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clusters.php b/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clusters.php index d1e6e368f526..51a3e3c98abd 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clusters.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_clusters.php @@ -29,8 +29,8 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; /** - * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and - * region. + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources on a given Google Cloud project and region. * * @param string $formattedParent The parent location which owns this collection of * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_node_pools.php b/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_node_pools.php index 7f0d7b2dc783..2c81ebfa2bfa 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_node_pools.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/list_azure_node_pools.php @@ -29,7 +29,9 @@ use Google\Cloud\GkeMultiCloud\V1\AzureNodePool; /** - * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * * @param string $formattedParent The parent `AzureCluster` which owns this collection of * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php b/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php index 75c3303a64ce..04ae46f44b2b 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_cluster.php @@ -32,6 +32,7 @@ use Google\Cloud\GkeMultiCloud\V1\AzureClustersClient; use Google\Cloud\GkeMultiCloud\V1\AzureControlPlane; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; +use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Protobuf\FieldMask; use Google\Rpc\Status; @@ -44,11 +45,13 @@ * 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: + * @param string $azureClusterResourceGroupId The ARM ID of the resource group where the cluster resources are + * deployed. For example: * `/subscriptions//resourceGroups/` - * @param string $azureClusterAzureClient Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - * how the Anthos Multi-Cloud API connects to Azure APIs. + * @param string $azureClusterAzureClient Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. * * The `AzureClient` resource must reside on the same GCP project and region * as the `AzureCluster`. @@ -58,8 +61,8 @@ * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with your - * cluster. + * @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. @@ -88,10 +91,15 @@ * 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 $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. * @param string $azureClusterAuthorizationAdminUsersUsername The name of the user, e.g. `my-gcp-id@gmail.com`. + * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be + * registered. + * + * Project names are formatted as + * `projects/`. */ function update_azure_cluster_sample( string $azureClusterAzureRegion, @@ -102,7 +110,8 @@ function update_azure_cluster_sample( string $azureClusterNetworkingServiceAddressCidrBlocksElement, string $azureClusterControlPlaneVersion, string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterAuthorizationAdminUsersUsername + string $azureClusterAuthorizationAdminUsersUsername, + string $azureClusterFleetProject ): void { // Create a client. $azureClustersClient = new AzureClustersClient(); @@ -128,13 +137,16 @@ function update_azure_cluster_sample( $azureClusterAuthorizationAdminUsers = [$azureClusterUser,]; $azureClusterAuthorization = (new AzureAuthorization()) ->setAdminUsers($azureClusterAuthorizationAdminUsers); + $azureClusterFleet = (new Fleet()) + ->setProject($azureClusterFleetProject); $azureCluster = (new AzureCluster()) ->setAzureRegion($azureClusterAzureRegion) ->setResourceGroupId($azureClusterResourceGroupId) ->setAzureClient($azureClusterAzureClient) ->setNetworking($azureClusterNetworking) ->setControlPlane($azureClusterControlPlane) - ->setAuthorization($azureClusterAuthorization); + ->setAuthorization($azureClusterAuthorization) + ->setFleet($azureClusterFleet); $updateMask = new FieldMask(); // Call the API and handle any network failures. @@ -177,6 +189,7 @@ function callSample(): void $azureClusterControlPlaneVersion = '[VERSION]'; $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; $azureClusterAuthorizationAdminUsersUsername = '[USERNAME]'; + $azureClusterFleetProject = '[PROJECT]'; update_azure_cluster_sample( $azureClusterAzureRegion, @@ -187,7 +200,8 @@ function callSample(): void $azureClusterNetworkingServiceAddressCidrBlocksElement, $azureClusterControlPlaneVersion, $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterAuthorizationAdminUsersUsername + $azureClusterAuthorizationAdminUsersUsername, + $azureClusterFleetProject ); } // [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync] diff --git a/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_node_pool.php b/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_node_pool.php index a0e85c6c3cc1..f3ec43e2c263 100644 --- a/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_node_pool.php +++ b/GkeMultiCloud/samples/V1/AzureClustersClient/update_azure_node_pool.php @@ -37,16 +37,17 @@ /** * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. * - * @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 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. */ function update_azure_node_pool_sample( diff --git a/GkeMultiCloud/src/V1/AttachedCluster.php b/GkeMultiCloud/src/V1/AttachedCluster.php new file mode 100644 index 000000000000..aa496bfdc2ca --- /dev/null +++ b/GkeMultiCloud/src/V1/AttachedCluster.php @@ -0,0 +1,877 @@ +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 GCP resource names. + * + * Generated from protobuf field string name = 1; + */ + private $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]; + */ + private $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]; + */ + private $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]; + */ + private $platform_version = ''; + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + private $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]; + */ + private $cluster_region = ''; + /** + * Required. Fleet configuration. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $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]; + */ + private $state = 0; + /** + * Output only. A globally unique identifier for the cluster. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $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]; + */ + private $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]; + */ + private $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]; + */ + private $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; + */ + private $etag = ''; + /** + * Output only. The Kubernetes version of the cluster. + * + * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $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]; + */ + private $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]; + */ + private $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]; + */ + private $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]; + */ + private $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//attachedClusters/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP 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"]. + * @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. + * } + */ + 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 GCP 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 GCP 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"]. + * + * 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"]. + * + * 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; + } + +} + diff --git a/GkeMultiCloud/src/V1/AttachedCluster/State.php b/GkeMultiCloud/src/V1/AttachedCluster/State.php new file mode 100644 index 000000000000..f76d6155007b --- /dev/null +++ b/GkeMultiCloud/src/V1/AttachedCluster/State.php @@ -0,0 +1,94 @@ +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); + } +} + + diff --git a/GkeMultiCloud/src/V1/AttachedClusterError.php b/GkeMultiCloud/src/V1/AttachedClusterError.php new file mode 100644 index 000000000000..daaf28d2aad1 --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AttachedClusterUser.php b/GkeMultiCloud/src/V1/AttachedClusterUser.php new file mode 100644 index 000000000000..3e2d4a9c758d --- /dev/null +++ b/GkeMultiCloud/src/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]; + */ + private $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/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php b/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php new file mode 100644 index 000000000000..87939094f336 --- /dev/null +++ b/GkeMultiCloud/src/V1/AttachedClustersAuthorization.php @@ -0,0 +1,83 @@ +google.cloud.gkemulticloud.v1.AttachedClustersAuthorization + */ +class AttachedClustersAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $admin_users; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users + * Required. Users that can perform operations as a cluster admin. A managed + * 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 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdminUsers() + { + return $this->admin_users; + } + + /** + * Required. Users that can perform operations as a cluster admin. A managed + * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + * to the users. Up to ten admin users can be provided. + * For more info on RBAC, see + * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + * + * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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; + } + +} + diff --git a/GkeMultiCloud/src/V1/AttachedClustersClient.php b/GkeMultiCloud/src/V1/AttachedClustersClient.php new file mode 100644 index 000000000000..a7029dacd067 --- /dev/null +++ b/GkeMultiCloud/src/V1/AttachedClustersClient.php @@ -0,0 +1,34 @@ +_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates an + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * @param \Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateAttachedCluster(\Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * 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. + * @param \Google\Cloud\GkeMultiCloud\V1\ImportAttachedClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportAttachedCluster(\Google\Cloud\GkeMultiCloud\V1\ImportAttachedClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Describes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * @param \Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetAttachedCluster(\Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', + $argument, + ['\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', 'decode'], + $metadata, $options); + } + + /** + * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources on a given Google Cloud project and region. + * @param \Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListAttachedClusters(\Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', + $argument, + ['\Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersResponse', 'decode'], + $metadata, $options); + } + + /** + * 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. + * @param \Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteAttachedCluster(\Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Returns information, such as supported Kubernetes versions, on a given + * Google Cloud location. + * @param \Google\Cloud\GkeMultiCloud\V1\GetAttachedServerConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetAttachedServerConfig(\Google\Cloud\GkeMultiCloud\V1\GetAttachedServerConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', + $argument, + ['\Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig', 'decode'], + $metadata, $options); + } + + /** + * Generates the install manifest to be installed on the target cluster. + * @param \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateAttachedClusterInstallManifest(\Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', + $argument, + ['\Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/GkeMultiCloud/src/V1/AttachedOidcConfig.php b/GkeMultiCloud/src/V1/AttachedOidcConfig.php new file mode 100644 index 000000000000..d6cfc65412e2 --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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]; + */ + private $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/GkeMultiCloud/src/V1/AttachedPlatformVersionInfo.php b/GkeMultiCloud/src/V1/AttachedPlatformVersionInfo.php new file mode 100644 index 000000000000..bcdbed40704c --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AttachedServerConfig.php b/GkeMultiCloud/src/V1/AttachedServerConfig.php new file mode 100644 index 000000000000..129c19cbc32f --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AwsAutoscalingGroupMetricsCollection.php b/GkeMultiCloud/src/V1/AwsAutoscalingGroupMetricsCollection.php new file mode 100644 index 000000000000..f50f8485b50c --- /dev/null +++ b/GkeMultiCloud/src/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]; + */ + private $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/GkeMultiCloud/src/V1/AwsCluster.php b/GkeMultiCloud/src/V1/AwsCluster.php index d19c6c7aa474..9e6c0e2b91c9 100644 --- a/GkeMultiCloud/src/V1/AwsCluster.php +++ b/GkeMultiCloud/src/V1/AwsCluster.php @@ -131,9 +131,9 @@ class AwsCluster extends \Google\Protobuf\Internal\Message */ private $cluster_ca_certificate = ''; /** - * Optional. Fleet configuration. + * Required. Fleet configuration. * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; */ private $fleet = null; /** @@ -142,6 +142,18 @@ class AwsCluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; */ private $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]; + */ + private $monitoring_config = null; /** * Constructor. @@ -201,9 +213,13 @@ class AwsCluster extends \Google\Protobuf\Internal\Message * @type string $cluster_ca_certificate * Output only. PEM encoded x509 certificate of the cluster root of trust. * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Optional. Fleet configuration. + * 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. * } */ public function __construct($data = NULL) { @@ -726,9 +742,9 @@ public function setClusterCaCertificate($var) } /** - * Optional. Fleet configuration. + * Required. Fleet configuration. * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * 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() @@ -747,9 +763,9 @@ public function clearFleet() } /** - * Optional. Fleet configuration. + * Required. Fleet configuration. * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * 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 */ @@ -797,5 +813,67 @@ public function setLoggingConfig($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; + } + } diff --git a/GkeMultiCloud/src/V1/AwsClusterError.php b/GkeMultiCloud/src/V1/AwsClusterError.php new file mode 100644 index 000000000000..3f755a6ca159 --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AwsClusterNetworking.php b/GkeMultiCloud/src/V1/AwsClusterNetworking.php index 325f4e89c76a..21775bac7845 100644 --- a/GkeMultiCloud/src/V1/AwsClusterNetworking.php +++ b/GkeMultiCloud/src/V1/AwsClusterNetworking.php @@ -26,17 +26,17 @@ class AwsClusterNetworking extends \Google\Protobuf\Internal\Message */ private $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. + * 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. + * 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]; */ @@ -53,13 +53,13 @@ class AwsClusterNetworking extends \Google\Protobuf\Internal\Message * (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. + * 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. + * 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. * } */ public function __construct($data = NULL) { @@ -98,9 +98,9 @@ public function setVpcId($var) } /** - * 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. + * 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 @@ -111,9 +111,9 @@ public function getPodAddressCidrBlocks() } /** - * 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. + * 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 @@ -128,9 +128,9 @@ public function setPodAddressCidrBlocks($var) } /** - * 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. + * 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 @@ -141,9 +141,9 @@ public function getServiceAddressCidrBlocks() } /** - * 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. + * 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 diff --git a/GkeMultiCloud/src/V1/AwsClustersGrpcClient.php b/GkeMultiCloud/src/V1/AwsClustersGrpcClient.php index 13b5afbbe434..4d1ffaf42616 100644 --- a/GkeMultiCloud/src/V1/AwsClustersGrpcClient.php +++ b/GkeMultiCloud/src/V1/AwsClustersGrpcClient.php @@ -34,7 +34,8 @@ public function __construct($hostname, $opts, $channel = null) { } /** - * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource on a given GCP project and region. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -68,7 +69,8 @@ public function UpdateAwsCluster(\Google\Cloud\GkeMultiCloud\V1\UpdateAwsCluster } /** - * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. * @param \Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -83,8 +85,8 @@ public function GetAwsCluster(\Google\Cloud\GkeMultiCloud\V1\GetAwsClusterReques } /** - * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and - * region. + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * on a given Google Cloud project and region. * @param \Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -99,10 +101,11 @@ public function ListAwsClusters(\Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRe } /** - * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. * - * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources. + * Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -137,7 +140,8 @@ public function GenerateAwsAccessToken(\Google\Cloud\GkeMultiCloud\V1\GenerateAw } /** - * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -171,7 +175,8 @@ public function UpdateAwsNodePool(\Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePo } /** - * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * Describes a specific + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. * @param \Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -186,7 +191,9 @@ public function GetAwsNodePool(\Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequ } /** - * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * @param \Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -201,7 +208,8 @@ public function ListAwsNodePools(\Google\Cloud\GkeMultiCloud\V1\ListAwsNodePools } /** - * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be diff --git a/GkeMultiCloud/src/V1/AwsControlPlane.php b/GkeMultiCloud/src/V1/AwsControlPlane.php index ff78737ffce2..64f3fbf2be12 100644 --- a/GkeMultiCloud/src/V1/AwsControlPlane.php +++ b/GkeMultiCloud/src/V1/AwsControlPlane.php @@ -57,8 +57,8 @@ class AwsControlPlane extends \Google\Protobuf\Internal\Message */ private $security_group_ids; /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each control - * plane replica. + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. * * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; */ @@ -91,8 +91,8 @@ class AwsControlPlane extends \Google\Protobuf\Internal\Message */ private $database_encryption = null; /** - * Optional. A set of AWS resource tags to propagate to all underlying managed AWS - * resources. + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. * Specify at most 50 pairs containing alphanumerics, spaces, and symbols * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to * 255 Unicode characters. @@ -154,8 +154,8 @@ class AwsControlPlane extends \Google\Protobuf\Internal\Message * 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. + * 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. @@ -172,8 +172,8 @@ class AwsControlPlane extends \Google\Protobuf\Internal\Message * @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. + * 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. @@ -356,8 +356,8 @@ public function setSecurityGroupIds($var) } /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each control - * plane replica. + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. * * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -368,8 +368,8 @@ public function getIamInstanceProfile() } /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each control - * plane replica. + * Required. The name or ARN of the AWS IAM instance profile to assign to each + * control plane replica. * * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -510,8 +510,8 @@ public function setDatabaseEncryption($var) } /** - * Optional. A set of AWS resource tags to propagate to all underlying managed AWS - * resources. + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. * Specify at most 50 pairs containing alphanumerics, spaces, and symbols * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to * 255 Unicode characters. @@ -525,8 +525,8 @@ public function getTags() } /** - * Optional. A set of AWS resource tags to propagate to all underlying managed AWS - * resources. + * Optional. A set of AWS resource tags to propagate to all underlying managed + * AWS resources. * Specify at most 50 pairs containing alphanumerics, spaces, and symbols * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to * 255 Unicode characters. diff --git a/GkeMultiCloud/src/V1/AwsNodeConfig.php b/GkeMultiCloud/src/V1/AwsNodeConfig.php index d57f983944f4..8c474cb3b400 100644 --- a/GkeMultiCloud/src/V1/AwsNodeConfig.php +++ b/GkeMultiCloud/src/V1/AwsNodeConfig.php @@ -46,16 +46,17 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message */ 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. + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. * * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $tags; /** - * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool. + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. * * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; */ @@ -76,9 +77,9 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message */ private $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. + * 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]; */ @@ -102,6 +103,14 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; */ private $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]; + */ + private $autoscaling_metrics_collection = null; /** * Constructor. @@ -124,12 +133,13 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * 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. + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. * @type string $iam_instance_profile - * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool. + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. * @type string $image_type * Optional. The OS image type to use on node pool instances. * Can have a value of `ubuntu`, or `windows` if the cluster enables @@ -138,9 +148,9 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * @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. + * 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 @@ -148,6 +158,10 @@ class AwsNodeConfig extends \Google\Protobuf\Internal\Message * @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. * } */ public function __construct($data = NULL) { @@ -282,10 +296,10 @@ public function setLabels($var) } /** - * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at - * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/). - * Keys can be up to 127 Unicode characters. - * Values can be up to 255 Unicode characters. + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. * * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -296,10 +310,10 @@ public function getTags() } /** - * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at - * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/). - * Keys can be up to 127 Unicode characters. - * Values can be up to 255 Unicode characters. + * Optional. Key/value metadata to assign to each underlying AWS resource. + * Specify at most 50 pairs containing alphanumerics, spaces, and symbols + * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + * 255 Unicode characters. * * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var @@ -314,7 +328,8 @@ public function setTags($var) } /** - * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool. + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. * * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -325,7 +340,8 @@ public function getIamInstanceProfile() } /** - * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool. + * Required. The name or ARN of the AWS IAM role assigned to nodes in the + * pool. * * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -408,9 +424,9 @@ public function setSshConfig($var) } /** - * 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. + * 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 @@ -421,9 +437,9 @@ public function getSecurityGroupIds() } /** - * 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. + * 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 @@ -547,5 +563,45 @@ public function setInstancePlacement($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; + } + } diff --git a/GkeMultiCloud/src/V1/AwsNodePool.php b/GkeMultiCloud/src/V1/AwsNodePool.php index 367fec552e65..f4c87301b3f9 100644 --- a/GkeMultiCloud/src/V1/AwsNodePool.php +++ b/GkeMultiCloud/src/V1/AwsNodePool.php @@ -26,7 +26,8 @@ class AwsNodePool extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). * You can list all supported versions on a given Google Cloud region by * calling * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. @@ -112,6 +113,12 @@ class AwsNodePool extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; */ private $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; /** * Constructor. @@ -126,7 +133,8 @@ class AwsNodePool extends \Google\Protobuf\Internal\Message * 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`). + * 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]. @@ -164,6 +172,8 @@ class AwsNodePool extends \Google\Protobuf\Internal\Message * @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. * } */ public function __construct($data = NULL) { @@ -206,7 +216,8 @@ public function setName($var) } /** - * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). * You can list all supported versions on a given Google Cloud region by * calling * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. @@ -220,7 +231,8 @@ public function getVersion() } /** - * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). + * Required. The Kubernetes version to run on this node pool (e.g. + * `1.19.10-gke.1000`). * You can list all supported versions on a given Google Cloud region by * calling * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. @@ -597,5 +609,31 @@ public function setMaxPodsConstraint($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; + } + } diff --git a/GkeMultiCloud/src/V1/AwsNodePoolAutoscaling.php b/GkeMultiCloud/src/V1/AwsNodePoolAutoscaling.php index 894058a7d7cf..ecb27ce21a77 100644 --- a/GkeMultiCloud/src/V1/AwsNodePoolAutoscaling.php +++ b/GkeMultiCloud/src/V1/AwsNodePoolAutoscaling.php @@ -17,15 +17,15 @@ 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. + * 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]; */ private $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. + * 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]; */ @@ -38,11 +38,11 @@ class AwsNodePoolAutoscaling extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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) { @@ -51,8 +51,8 @@ public function __construct($data = NULL) { } /** - * Required. Minimum number of nodes in the node pool. Must be greater than or equal to - * 1 and less than or equal to max_node_count. + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. * * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -63,8 +63,8 @@ public function getMinNodeCount() } /** - * Required. Minimum number of nodes in the node pool. Must be greater than or equal to - * 1 and less than or equal to max_node_count. + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. * * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; * @param int $var @@ -79,8 +79,8 @@ public function setMinNodeCount($var) } /** - * Required. Maximum number of nodes in the node pool. Must be greater than or equal to - * min_node_count and less than or equal to 50. + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. * * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -91,8 +91,8 @@ public function getMaxNodeCount() } /** - * Required. Maximum number of nodes in the node pool. Must be greater than or equal to - * min_node_count and less than or equal to 50. + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. * * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @param int $var diff --git a/GkeMultiCloud/src/V1/AwsNodePoolError.php b/GkeMultiCloud/src/V1/AwsNodePoolError.php new file mode 100644 index 000000000000..9c30d9a13051 --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AwsProxyConfig.php b/GkeMultiCloud/src/V1/AwsProxyConfig.php index 8584b61000ed..0d5ac3f2fd57 100644 --- a/GkeMultiCloud/src/V1/AwsProxyConfig.php +++ b/GkeMultiCloud/src/V1/AwsProxyConfig.php @@ -18,6 +18,9 @@ class AwsProxyConfig extends \Google\Protobuf\Internal\Message /** * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file * * Generated from protobuf field string secret_arn = 1; */ @@ -39,6 +42,9 @@ class AwsProxyConfig extends \Google\Protobuf\Internal\Message * @type string $secret_arn * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file * @type string $secret_version * The version string of the AWS Secret Manager secret that contains the * HTTP(S) proxy configuration. @@ -52,6 +58,9 @@ public function __construct($data = NULL) { /** * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file * * Generated from protobuf field string secret_arn = 1; * @return string @@ -64,6 +73,9 @@ public function getSecretArn() /** * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy * configuration. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file * * Generated from protobuf field string secret_arn = 1; * @param string $var diff --git a/GkeMultiCloud/src/V1/AwsServicesAuthentication.php b/GkeMultiCloud/src/V1/AwsServicesAuthentication.php index 8cacd9e2d075..b93a3f19431e 100644 --- a/GkeMultiCloud/src/V1/AwsServicesAuthentication.php +++ b/GkeMultiCloud/src/V1/AwsServicesAuthentication.php @@ -16,8 +16,8 @@ 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. + * 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]; */ @@ -37,8 +37,8 @@ class AwsServicesAuthentication extends \Google\Protobuf\Internal\Message * 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. + * 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`. @@ -50,8 +50,8 @@ public function __construct($data = NULL) { } /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API - * will assume when managing AWS resources on your account. + * Required. The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. * * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -62,8 +62,8 @@ public function getRoleArn() } /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API - * will assume when managing AWS resources on your account. + * Required. The Amazon Resource Name (ARN) of the role that the Anthos + * Multi-Cloud API will assume when managing AWS resources on your account. * * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/AwsVolumeTemplate.php b/GkeMultiCloud/src/V1/AwsVolumeTemplate.php index 459f29e76014..357227a37aec 100644 --- a/GkeMultiCloud/src/V1/AwsVolumeTemplate.php +++ b/GkeMultiCloud/src/V1/AwsVolumeTemplate.php @@ -31,14 +31,15 @@ class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message */ private $volume_type = 0; /** - * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume. + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. * * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $iops = 0; /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to - * encrypt AWS EBS volumes. + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. * If not specified, the default Amazon managed key associated to * the AWS region where this cluster runs will be used. * @@ -60,10 +61,11 @@ class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message * 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. + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. * @type string $kms_key_arn - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to - * encrypt AWS EBS volumes. + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. * If not specified, the default Amazon managed key associated to * the AWS region where this cluster runs will be used. * } @@ -132,7 +134,8 @@ public function setVolumeType($var) } /** - * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume. + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. * * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -143,7 +146,8 @@ public function getIops() } /** - * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume. + * Optional. The number of I/O operations per second (IOPS) to provision for + * GP3 volume. * * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -158,8 +162,8 @@ public function setIops($var) } /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to - * encrypt AWS EBS volumes. + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. * If not specified, the default Amazon managed key associated to * the AWS region where this cluster runs will be used. * @@ -172,8 +176,8 @@ public function getKmsKeyArn() } /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to - * encrypt AWS EBS volumes. + * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + * used to encrypt AWS EBS volumes. * If not specified, the default Amazon managed key associated to * the AWS region where this cluster runs will be used. * diff --git a/GkeMultiCloud/src/V1/AzureClient.php b/GkeMultiCloud/src/V1/AzureClient.php index dd58f8f961f1..8e99c6971e22 100644 --- a/GkeMultiCloud/src/V1/AzureClient.php +++ b/GkeMultiCloud/src/V1/AzureClient.php @@ -11,9 +11,10 @@ /** * `AzureClient` resources hold client authentication information needed by the * Anthos Multi-Cloud API to manage Azure resources on your Azure subscription. - * When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is created, an `AzureClient` resource needs to be - * provided and all operations on Azure resources associated to that cluster - * will authenticate to Azure services using the given client. + * When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is + * created, an `AzureClient` resource needs to be provided and all operations on + * Azure resources associated to that cluster will authenticate to Azure + * services using the given client. * `AzureClient` resources are immutable and cannot be modified upon creation. * Each `AzureClient` resource is bound to a single Azure Active Directory * Application and tenant. diff --git a/GkeMultiCloud/src/V1/AzureCluster.php b/GkeMultiCloud/src/V1/AzureCluster.php index 8686a6d9c0c5..c2cb38f407ef 100644 --- a/GkeMultiCloud/src/V1/AzureCluster.php +++ b/GkeMultiCloud/src/V1/AzureCluster.php @@ -43,16 +43,18 @@ class AzureCluster extends \Google\Protobuf\Internal\Message */ private $azure_region = ''; /** - * Required. The ARM ID of the resource group where the cluster resources are deployed. - * For example: + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: * `/subscriptions//resourceGroups/` * * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; */ private $resource_group_id = ''; /** - * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - * how the Anthos Multi-Cloud API connects to Azure APIs. + * Required. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. * The `AzureClient` resource must reside on the same GCP project and region * as the `AzureCluster`. * `AzureClient` names are formatted as @@ -152,13 +154,13 @@ class AzureCluster extends \Google\Protobuf\Internal\Message */ private $cluster_ca_certificate = ''; /** - * Optional. Fleet configuration. + * Required. Fleet configuration. * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; */ private $fleet = null; /** - * Output only. Mananged Azure resources for this cluster. + * 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]; */ @@ -169,6 +171,18 @@ class AzureCluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; */ private $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]; + */ + private $monitoring_config = null; /** * Constructor. @@ -192,12 +206,14 @@ class AzureCluster extends \Google\Protobuf\Internal\Message * [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: + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: * `/subscriptions//resourceGroups/` * @type string $azure_client - * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - * how the Anthos Multi-Cloud API connects to Azure APIs. + * Required. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. * The `AzureClient` resource must reside on the same GCP project and region * as the `AzureCluster`. * `AzureClient` names are formatted as @@ -241,11 +257,15 @@ class AzureCluster extends \Google\Protobuf\Internal\Message * @type string $cluster_ca_certificate * Output only. PEM encoded x509 certificate of the cluster root of trust. * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Optional. Fleet configuration. + * Required. Fleet configuration. * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $managed_resources - * Output only. Mananged Azure resources for this cluster. + * 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) { @@ -350,8 +370,8 @@ public function setAzureRegion($var) } /** - * Required. The ARM ID of the resource group where the cluster resources are deployed. - * For example: + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: * `/subscriptions//resourceGroups/` * * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; @@ -363,8 +383,8 @@ public function getResourceGroupId() } /** - * Required. The ARM ID of the resource group where the cluster resources are deployed. - * For example: + * Required. The ARM ID of the resource group where the cluster resources are + * deployed. For example: * `/subscriptions//resourceGroups/` * * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; @@ -380,8 +400,10 @@ public function setResourceGroupId($var) } /** - * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - * how the Anthos Multi-Cloud API connects to Azure APIs. + * Required. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. * The `AzureClient` resource must reside on the same GCP project and region * as the `AzureCluster`. * `AzureClient` names are formatted as @@ -398,8 +420,10 @@ public function getAzureClient() } /** - * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - * how the Anthos Multi-Cloud API connects to Azure APIs. + * Required. Name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + * authentication configuration for how the Anthos Multi-Cloud API connects to + * Azure APIs. * The `AzureClient` resource must reside on the same GCP project and region * as the `AzureCluster`. * `AzureClient` names are formatted as @@ -838,9 +862,9 @@ public function setClusterCaCertificate($var) } /** - * Optional. Fleet configuration. + * Required. Fleet configuration. * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * 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() @@ -859,9 +883,9 @@ public function clearFleet() } /** - * Optional. Fleet configuration. + * Required. Fleet configuration. * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * 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 */ @@ -874,7 +898,7 @@ public function setFleet($var) } /** - * Output only. Mananged Azure resources for this cluster. + * 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 @@ -895,7 +919,7 @@ public function clearManagedResources() } /** - * Output only. Mananged Azure resources for this cluster. + * 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 @@ -945,5 +969,67 @@ public function setLoggingConfig($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/GkeMultiCloud/src/V1/AzureClusterError.php b/GkeMultiCloud/src/V1/AzureClusterError.php new file mode 100644 index 000000000000..87a4e11c7cb3 --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AzureClusterNetworking.php b/GkeMultiCloud/src/V1/AzureClusterNetworking.php index bae91dfee844..f083c4513f0b 100644 --- a/GkeMultiCloud/src/V1/AzureClusterNetworking.php +++ b/GkeMultiCloud/src/V1/AzureClusterNetworking.php @@ -16,8 +16,8 @@ class AzureClusterNetworking extends \Google\Protobuf\Internal\Message { /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your - * cluster. + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. * All components in the cluster (i.e. control plane and node pools) run on a * single VNet. * Example: @@ -48,8 +48,8 @@ class AzureClusterNetworking extends \Google\Protobuf\Internal\Message */ 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 + * 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" @@ -65,8 +65,8 @@ class AzureClusterNetworking extends \Google\Protobuf\Internal\Message * 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. + * 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: @@ -85,8 +85,8 @@ class AzureClusterNetworking extends \Google\Protobuf\Internal\Message * 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 + * 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" @@ -98,8 +98,8 @@ public function __construct($data = NULL) { } /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your - * cluster. + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. * All components in the cluster (i.e. control plane and node pools) run on a * single VNet. * Example: @@ -115,8 +115,8 @@ public function getVirtualNetworkId() } /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your - * cluster. + * Required. The Azure Resource Manager (ARM) ID of the VNet associated with + * your cluster. * All components in the cluster (i.e. control plane and node pools) run on a * single VNet. * Example: @@ -204,8 +204,8 @@ public function setServiceAddressCidrBlocks($var) } /** - * Optional. The ARM ID of the subnet where Kubernetes private service type load - * balancers are deployed. When unspecified, it defaults to + * Optional. The ARM ID of the subnet where Kubernetes private service type + * load balancers are deployed. When unspecified, it defaults to * AzureControlPlane.subnet_id. * Example: * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" @@ -219,8 +219,8 @@ public function getServiceLoadBalancerSubnetId() } /** - * Optional. The ARM ID of the subnet where Kubernetes private service type load - * balancers are deployed. When unspecified, it defaults to + * Optional. The ARM ID of the subnet where Kubernetes private service type + * load balancers are deployed. When unspecified, it defaults to * AzureControlPlane.subnet_id. * Example: * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" diff --git a/GkeMultiCloud/src/V1/AzureClustersGrpcClient.php b/GkeMultiCloud/src/V1/AzureClustersGrpcClient.php index 31651b4ac602..07d8783d1087 100644 --- a/GkeMultiCloud/src/V1/AzureClustersGrpcClient.php +++ b/GkeMultiCloud/src/V1/AzureClustersGrpcClient.php @@ -34,8 +34,8 @@ public function __construct($hostname, $opts, $channel = null) { } /** - * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project - * and region. + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource on a given Google Cloud project and region. * * `AzureClient` resources hold client authentication * information needed by the Anthos Multicloud API to manage Azure resources @@ -58,7 +58,8 @@ public function CreateAzureClient(\Google\Cloud\GkeMultiCloud\V1\CreateAzureClie } /** - * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * Describes a specific + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. * @param \Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -73,8 +74,8 @@ public function GetAzureClient(\Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequ } /** - * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and - * region. + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources on a given Google Cloud project and region. * @param \Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -89,7 +90,8 @@ public function ListAzureClients(\Google\Cloud\GkeMultiCloud\V1\ListAzureClients } /** - * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource. * * If the client is used by one or more clusters, deletion will * fail and a `FAILED_PRECONDITION` error will be returned. @@ -111,7 +113,8 @@ public function DeleteAzureClient(\Google\Cloud\GkeMultiCloud\V1\DeleteAzureClie } /** - * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource on a given GCP project and region. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -145,7 +148,8 @@ public function UpdateAzureCluster(\Google\Cloud\GkeMultiCloud\V1\UpdateAzureClu } /** - * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * Describes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * @param \Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -160,8 +164,8 @@ public function GetAzureCluster(\Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRe } /** - * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and - * region. + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources on a given Google Cloud project and region. * @param \Google\Cloud\GkeMultiCloud\V1\ListAzureClustersRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -176,10 +180,11 @@ public function ListAzureClusters(\Google\Cloud\GkeMultiCloud\V1\ListAzureCluste } /** - * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * Deletes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * - * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources. + * Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -214,7 +219,9 @@ public function GenerateAzureAccessToken(\Google\Cloud\GkeMultiCloud\V1\Generate } /** - * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + * attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -248,7 +255,8 @@ public function UpdateAzureNodePool(\Google\Cloud\GkeMultiCloud\V1\UpdateAzureNo } /** - * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * Describes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. * @param \Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -263,7 +271,9 @@ public function GetAzureNodePool(\Google\Cloud\GkeMultiCloud\V1\GetAzureNodePool } /** - * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * @param \Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -278,7 +288,8 @@ public function ListAzureNodePools(\Google\Cloud\GkeMultiCloud\V1\ListAzureNodeP } /** - * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * Deletes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be diff --git a/GkeMultiCloud/src/V1/AzureConfigEncryption.php b/GkeMultiCloud/src/V1/AzureConfigEncryption.php index da9a81a9eb08..c9c99c3518ae 100644 --- a/GkeMultiCloud/src/V1/AzureConfigEncryption.php +++ b/GkeMultiCloud/src/V1/AzureConfigEncryption.php @@ -18,7 +18,8 @@ class AzureConfigEncryption extends \Google\Protobuf\Internal\Message { /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data. + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. * For example: * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` * @@ -26,7 +27,8 @@ class AzureConfigEncryption extends \Google\Protobuf\Internal\Message */ private $key_id = ''; /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data. + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) * in ASN.1 DER form. The string must be comprised of a single PEM block of * type "PUBLIC KEY". @@ -42,11 +44,13 @@ class AzureConfigEncryption extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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". @@ -58,7 +62,8 @@ public function __construct($data = NULL) { } /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data. + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. * For example: * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` * @@ -71,7 +76,8 @@ public function getKeyId() } /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data. + * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + * data. * For example: * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` * @@ -88,7 +94,8 @@ public function setKeyId($var) } /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data. + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) * in ASN.1 DER form. The string must be comprised of a single PEM block of * type "PUBLIC KEY". @@ -102,7 +109,8 @@ public function getPublicKey() } /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data. + * Optional. RSA key of the Azure Key Vault public key to use for encrypting + * the data. * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) * in ASN.1 DER form. The string must be comprised of a single PEM block of * type "PUBLIC KEY". diff --git a/GkeMultiCloud/src/V1/AzureControlPlane.php b/GkeMultiCloud/src/V1/AzureControlPlane.php index 2a2ae569fa60..0e4b51b12846 100644 --- a/GkeMultiCloud/src/V1/AzureControlPlane.php +++ b/GkeMultiCloud/src/V1/AzureControlPlane.php @@ -26,8 +26,8 @@ class AzureControlPlane extends \Google\Protobuf\Internal\Message */ private $version = ''; /** - * Optional. The ARM ID of the default subnet for the control plane. The control plane - * VMs are deployed in this subnet, unless + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless * `AzureControlPlane.replica_placements` is specified. This subnet will also * be used as default for `AzureControlPlane.endpoint_subnet_id` if * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will @@ -91,7 +91,8 @@ class AzureControlPlane extends \Google\Protobuf\Internal\Message */ private $config_encryption = null; /** - * Optional. A set of tags to apply to all underlying control plane Azure resources. + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. * * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -106,8 +107,8 @@ class AzureControlPlane extends \Google\Protobuf\Internal\Message */ 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. + * 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" * @@ -128,8 +129,8 @@ class AzureControlPlane extends \Google\Protobuf\Internal\Message * 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 + * 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 @@ -161,15 +162,16 @@ class AzureControlPlane extends \Google\Protobuf\Internal\Message * @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. + * 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. + * 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" * } @@ -214,8 +216,8 @@ public function setVersion($var) } /** - * Optional. The ARM ID of the default subnet for the control plane. The control plane - * VMs are deployed in this subnet, unless + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless * `AzureControlPlane.replica_placements` is specified. This subnet will also * be used as default for `AzureControlPlane.endpoint_subnet_id` if * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will @@ -233,8 +235,8 @@ public function getSubnetId() } /** - * Optional. The ARM ID of the default subnet for the control plane. The control plane - * VMs are deployed in this subnet, unless + * Optional. The ARM ID of the default subnet for the control plane. The + * control plane VMs are deployed in this subnet, unless * `AzureControlPlane.replica_placements` is specified. This subnet will also * be used as default for `AzureControlPlane.endpoint_subnet_id` if * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will @@ -516,7 +518,8 @@ public function setConfigEncryption($var) } /** - * Optional. A set of tags to apply to all underlying control plane Azure resources. + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. * * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -527,7 +530,8 @@ public function getTags() } /** - * Optional. A set of tags to apply to all underlying control plane Azure resources. + * Optional. A set of tags to apply to all underlying control plane Azure + * resources. * * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var @@ -574,8 +578,8 @@ public function setReplicaPlacements($var) } /** - * Optional. The ARM ID of the subnet where the control plane load balancer is deployed. - * When unspecified, it defaults to AzureControlPlane.subnet_id. + * Optional. The ARM ID of the subnet where the control plane load balancer is + * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. * Example: * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" * @@ -588,8 +592,8 @@ public function getEndpointSubnetId() } /** - * Optional. The ARM ID of the subnet where the control plane load balancer is deployed. - * When unspecified, it defaults to AzureControlPlane.subnet_id. + * Optional. The ARM ID of the subnet where the control plane load balancer is + * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. * Example: * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" * diff --git a/GkeMultiCloud/src/V1/AzureNodeConfig.php b/GkeMultiCloud/src/V1/AzureNodeConfig.php index 53a147a47792..59f617643528 100644 --- a/GkeMultiCloud/src/V1/AzureNodeConfig.php +++ b/GkeMultiCloud/src/V1/AzureNodeConfig.php @@ -34,8 +34,8 @@ class AzureNodeConfig extends \Google\Protobuf\Internal\Message */ private $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. + * 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. @@ -101,8 +101,8 @@ class AzureNodeConfig extends \Google\Protobuf\Internal\Message * 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. + * 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. @@ -203,8 +203,8 @@ public function setRootVolume($var) } /** - * Optional. A set of tags to apply to all underlying Azure resources for this node - * pool. This currently only includes Virtual Machine Scale Sets. + * Optional. A set of tags to apply to all underlying Azure resources for this + * node pool. This currently only includes Virtual Machine Scale Sets. * Specify at most 50 pairs containing alphanumerics, spaces, and symbols * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to * 255 Unicode characters. @@ -218,8 +218,8 @@ public function getTags() } /** - * Optional. A set of tags to apply to all underlying Azure resources for this node - * pool. This currently only includes Virtual Machine Scale Sets. + * Optional. A set of tags to apply to all underlying Azure resources for this + * node pool. This currently only includes Virtual Machine Scale Sets. * Specify at most 50 pairs containing alphanumerics, spaces, and symbols * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to * 255 Unicode characters. diff --git a/GkeMultiCloud/src/V1/AzureNodePool.php b/GkeMultiCloud/src/V1/AzureNodePool.php index 7bac98c04227..22c4c34f4c11 100644 --- a/GkeMultiCloud/src/V1/AzureNodePool.php +++ b/GkeMultiCloud/src/V1/AzureNodePool.php @@ -26,7 +26,8 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool. + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. * * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,8 +39,8 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message */ private $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. + * 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]; */ @@ -117,6 +118,12 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; */ private $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; /** * Constructor. @@ -131,12 +138,13 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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 @@ -170,6 +178,8 @@ class AzureNodePool extends \Google\Protobuf\Internal\Message * @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. * } */ public function __construct($data = NULL) { @@ -212,7 +222,8 @@ public function setName($var) } /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool. + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. * * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -223,7 +234,8 @@ public function getVersion() } /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool. + * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + * node pool. * * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -274,8 +286,8 @@ public function setConfig($var) } /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a - * subnet under the virtual network in the cluster configuration. + * Required. The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. * * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -286,8 +298,8 @@ public function getSubnetId() } /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a - * subnet under the virtual network in the cluster configuration. + * Required. The ARM ID of the subnet where the node pool VMs run. Make sure + * it's a subnet under the virtual network in the cluster configuration. * * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -627,5 +639,31 @@ public function setAzureAvailabilityZone($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; + } + } diff --git a/GkeMultiCloud/src/V1/AzureNodePoolAutoscaling.php b/GkeMultiCloud/src/V1/AzureNodePoolAutoscaling.php index 56b03897d335..beb9d081090f 100644 --- a/GkeMultiCloud/src/V1/AzureNodePoolAutoscaling.php +++ b/GkeMultiCloud/src/V1/AzureNodePoolAutoscaling.php @@ -18,15 +18,15 @@ 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. + * 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]; */ private $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. + * 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]; */ @@ -39,11 +39,11 @@ class AzureNodePoolAutoscaling extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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) { @@ -52,8 +52,8 @@ public function __construct($data = NULL) { } /** - * Required. Minimum number of nodes in the node pool. Must be greater than or equal to - * 1 and less than or equal to max_node_count. + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. * * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -64,8 +64,8 @@ public function getMinNodeCount() } /** - * Required. Minimum number of nodes in the node pool. Must be greater than or equal to - * 1 and less than or equal to max_node_count. + * Required. Minimum number of nodes in the node pool. Must be greater than or + * equal to 1 and less than or equal to max_node_count. * * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; * @param int $var @@ -80,8 +80,8 @@ public function setMinNodeCount($var) } /** - * Required. Maximum number of nodes in the node pool. Must be greater than or equal to - * min_node_count and less than or equal to 50. + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. * * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -92,8 +92,8 @@ public function getMaxNodeCount() } /** - * Required. Maximum number of nodes in the node pool. Must be greater than or equal to - * min_node_count and less than or equal to 50. + * Required. Maximum number of nodes in the node pool. Must be greater than or + * equal to min_node_count and less than or equal to 50. * * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; * @param int $var diff --git a/GkeMultiCloud/src/V1/AzureNodePoolError.php b/GkeMultiCloud/src/V1/AzureNodePoolError.php new file mode 100644 index 000000000000..81a43321f84e --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/AzureProxyConfig.php b/GkeMultiCloud/src/V1/AzureProxyConfig.php index f3f29552cefc..e4343728def7 100644 --- a/GkeMultiCloud/src/V1/AzureProxyConfig.php +++ b/GkeMultiCloud/src/V1/AzureProxyConfig.php @@ -25,6 +25,9 @@ class AzureProxyConfig extends \Google\Protobuf\Internal\Message private $resource_group_id = ''; /** * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file * Secret ids are formatted as * `https://.vault.azure.net/secrets//`. * @@ -44,6 +47,9 @@ class AzureProxyConfig extends \Google\Protobuf\Internal\Message * `/subscriptions//resourceGroups/`. * @type string $secret_id * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file * Secret ids are formatted as * `https://.vault.azure.net/secrets//`. * } @@ -85,6 +91,9 @@ public function setResourceGroupId($var) /** * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file * Secret ids are formatted as * `https://.vault.azure.net/secrets//`. * @@ -98,6 +107,9 @@ public function getSecretId() /** * The URL the of the proxy setting secret with its version. + * The secret must be a JSON encoded proxy configuration + * as described in + * https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file * Secret ids are formatted as * `https://.vault.azure.net/secrets//`. * diff --git a/GkeMultiCloud/src/V1/AzureSshConfig.php b/GkeMultiCloud/src/V1/AzureSshConfig.php index ec17daeb939e..f37d5cfd3438 100644 --- a/GkeMultiCloud/src/V1/AzureSshConfig.php +++ b/GkeMultiCloud/src/V1/AzureSshConfig.php @@ -16,9 +16,9 @@ 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. + * 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]; */ @@ -31,9 +31,9 @@ class AzureSshConfig extends \Google\Protobuf\Internal\Message * 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. + * 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) { @@ -42,9 +42,9 @@ public function __construct($data = NULL) { } /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts the - * authorized_keys file format used in OpenSSH according to the sshd(8) manual - * page. + * Required. The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. * * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -55,9 +55,9 @@ public function getAuthorizedKey() } /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts the - * authorized_keys file format used in OpenSSH according to the sshd(8) manual - * page. + * Required. The SSH public key data for VMs managed by Anthos. This accepts + * the authorized_keys file format used in OpenSSH according to the sshd(8) + * manual page. * * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/CreateAttachedClusterRequest.php b/GkeMultiCloud/src/V1/CreateAttachedClusterRequest.php new file mode 100644 index 000000000000..9a3b0fc560e7 --- /dev/null +++ b/GkeMultiCloud/src/V1/CreateAttachedClusterRequest.php @@ -0,0 +1,227 @@ +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) = { + */ + private $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]; + */ + private $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]; + */ + private $attached_cluster_id = ''; + /** + * If set, only validate the request, but do not actually create the cluster. + * + * Generated from protobuf field bool validate_only = 4; + */ + private $validate_only = false; + + /** + * 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/GkeMultiCloud/src/V1/CreateAwsClusterRequest.php b/GkeMultiCloud/src/V1/CreateAwsClusterRequest.php index 85e145dc09de..878fe63fff74 100644 --- a/GkeMultiCloud/src/V1/CreateAwsClusterRequest.php +++ b/GkeMultiCloud/src/V1/CreateAwsClusterRequest.php @@ -16,8 +16,9 @@ class CreateAwsClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource - * will be created. + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -26,18 +27,20 @@ class CreateAwsClusterRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -56,20 +59,23 @@ class CreateAwsClusterRequest extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @type bool $validate_only * If set, only validate the request, but do not actually create the cluster. * } @@ -80,8 +86,9 @@ public function __construct($data = NULL) { } /** - * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource - * will be created. + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -95,8 +102,9 @@ public function getParent() } /** - * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource - * will be created. + * Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -114,7 +122,8 @@ public function setParent($var) } /** - * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null @@ -135,7 +144,8 @@ public function clearAwsCluster() } /** - * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var @@ -150,12 +160,13 @@ public function setAwsCluster($var) } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -166,12 +177,13 @@ public function getAwsClusterId() } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/CreateAwsNodePoolRequest.php b/GkeMultiCloud/src/V1/CreateAwsNodePoolRequest.php index 8fee3ed12584..7ae3b9fef711 100644 --- a/GkeMultiCloud/src/V1/CreateAwsNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/CreateAwsNodePoolRequest.php @@ -16,7 +16,8 @@ class CreateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -26,18 +27,20 @@ class CreateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -57,20 +60,23 @@ class CreateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @type bool $validate_only * If set, only validate the request, but do not actually create the node * pool. @@ -82,7 +88,8 @@ public function __construct($data = NULL) { } /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -97,7 +104,8 @@ public function getParent() } /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -116,7 +124,8 @@ public function setParent($var) } /** - * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. * * 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 @@ -137,7 +146,8 @@ public function clearAwsNodePool() } /** - * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. * * 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 @@ -152,12 +162,13 @@ public function setAwsNodePool($var) } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -168,12 +179,13 @@ public function getAwsNodePoolId() } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/CreateAzureClientRequest.php b/GkeMultiCloud/src/V1/CreateAzureClientRequest.php index 45dc9de0d09c..37a7934caa9e 100644 --- a/GkeMultiCloud/src/V1/CreateAzureClientRequest.php +++ b/GkeMultiCloud/src/V1/CreateAzureClientRequest.php @@ -16,8 +16,9 @@ class CreateAzureClientRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource - * will be created. + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -26,18 +27,20 @@ class CreateAzureClientRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; */ @@ -56,20 +59,23 @@ class CreateAzureClientRequest extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @type bool $validate_only * If set, only validate the request, but do not actually create the client. * } @@ -80,8 +86,9 @@ public function __construct($data = NULL) { } /** - * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource - * will be created. + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -95,8 +102,9 @@ public function getParent() } /** - * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource - * will be created. + * Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -114,7 +122,8 @@ public function setParent($var) } /** - * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\GkeMultiCloud\V1\AzureClient|null @@ -135,7 +144,8 @@ public function clearAzureClient() } /** - * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $var @@ -150,12 +160,13 @@ public function setAzureClient($var) } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -166,12 +177,13 @@ public function getAzureClientId() } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/CreateAzureClusterRequest.php b/GkeMultiCloud/src/V1/CreateAzureClusterRequest.php index e5b29d873b9e..a7ad4c813d2c 100644 --- a/GkeMultiCloud/src/V1/CreateAzureClusterRequest.php +++ b/GkeMultiCloud/src/V1/CreateAzureClusterRequest.php @@ -16,8 +16,9 @@ class CreateAzureClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource - * will be created. + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -26,18 +27,20 @@ class CreateAzureClusterRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -56,20 +59,23 @@ class CreateAzureClusterRequest extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @type bool $validate_only * If set, only validate the request, but do not actually create the cluster. * } @@ -80,8 +86,9 @@ public function __construct($data = NULL) { } /** - * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource - * will be created. + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -95,8 +102,9 @@ public function getParent() } /** - * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource - * will be created. + * Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -114,7 +122,8 @@ public function setParent($var) } /** - * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null @@ -135,7 +144,8 @@ public function clearAzureCluster() } /** - * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var @@ -150,12 +160,13 @@ public function setAzureCluster($var) } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -166,12 +177,13 @@ public function getAzureClusterId() } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php index 7989cd5f6bfe..7b09bd663f9c 100644 --- a/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/CreateAzureNodePoolRequest.php @@ -16,7 +16,8 @@ class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -25,18 +26,20 @@ class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. * * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -56,19 +59,22 @@ class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * 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. + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool - * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. * @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 + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @type bool $validate_only * If set, only validate the request, but do not actually create the node * pool. @@ -80,7 +86,8 @@ public function __construct($data = NULL) { } /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -94,7 +101,8 @@ public function getParent() } /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. * Location names are formatted as `projects//locations/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -112,7 +120,8 @@ public function setParent($var) } /** - * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. * * 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 @@ -133,7 +142,8 @@ public function clearAzureNodePool() } /** - * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. * * 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 @@ -148,12 +158,13 @@ public function setAzureNodePool($var) } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -164,12 +175,13 @@ public function getAzureNodePoolId() } /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/DeleteAttachedClusterRequest.php b/GkeMultiCloud/src/V1/DeleteAttachedClusterRequest.php new file mode 100644 index 000000000000..418f6a3290d8 --- /dev/null +++ b/GkeMultiCloud/src/V1/DeleteAttachedClusterRequest.php @@ -0,0 +1,271 @@ +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 GCP resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + /** + * If set, only validate the request, but do not actually delete the resource. + * + * Generated from protobuf field bool validate_only = 2; + */ + private $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; + */ + private $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; + */ + private $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; + */ + private $etag = ''; + + /** + * 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 GCP 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 GCP 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 GCP 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/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php b/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php index c46f305d11de..0f54a7e5fff0 100644 --- a/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAwsClusterRequest.php @@ -16,7 +16,8 @@ class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -32,16 +33,18 @@ class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message */ private $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. + * 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; */ private $allow_missing = false; /** - * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. @@ -57,7 +60,8 @@ class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -65,12 +69,14 @@ class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message * @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. + * 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 string $etag - * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. @@ -82,7 +88,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -97,7 +104,8 @@ public function getName() } /** - * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -142,9 +150,10 @@ public function setValidateOnly($var) } /** - * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 3; @@ -156,9 +165,10 @@ public function getAllowMissing() } /** - * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 3; @@ -174,7 +184,8 @@ public function setAllowMissing($var) } /** - * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. @@ -188,7 +199,8 @@ public function getEtag() } /** - * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. diff --git a/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php b/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php index 032b2ce0a0ce..279e41bdb7c3 100644 --- a/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAwsNodePoolRequest.php @@ -9,14 +9,15 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for `AwsClusters.DeleteNodePool` method. + * Request message for `AwsClusters.DeleteAwsNodePool` method. * * Generated from protobuf message 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. + * 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) @@ -33,16 +34,18 @@ class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message */ private $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. + * 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; */ private $allow_missing = false; /** - * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. @@ -58,7 +61,8 @@ class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -67,12 +71,14 @@ class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * 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. + * 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 string $etag - * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. @@ -84,7 +90,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -99,7 +106,8 @@ public function getName() } /** - * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -146,9 +154,10 @@ public function setValidateOnly($var) } /** - * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 3; @@ -160,9 +169,10 @@ public function getAllowMissing() } /** - * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 3; @@ -178,7 +188,8 @@ public function setAllowMissing($var) } /** - * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. @@ -192,7 +203,8 @@ public function getEtag() } /** - * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. diff --git a/GkeMultiCloud/src/V1/DeleteAzureClientRequest.php b/GkeMultiCloud/src/V1/DeleteAzureClientRequest.php index 646f84e80bbd..b08c03ee705d 100644 --- a/GkeMultiCloud/src/V1/DeleteAzureClientRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAzureClientRequest.php @@ -16,8 +16,10 @@ 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 + * 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. @@ -26,9 +28,10 @@ class DeleteAzureClientRequest extends \Google\Protobuf\Internal\Message */ private $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. + * 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; @@ -48,15 +51,18 @@ class DeleteAzureClientRequest extends \Google\Protobuf\Internal\Message * 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 + * 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. + * 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. @@ -68,8 +74,10 @@ public function __construct($data = NULL) { } /** - * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -83,8 +91,10 @@ public function getName() } /** - * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -102,9 +112,10 @@ public function setName($var) } /** - * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 2; @@ -116,9 +127,10 @@ public function getAllowMissing() } /** - * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 2; diff --git a/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php b/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php index c29d480aa126..095624bbec7e 100644 --- a/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php @@ -16,7 +16,8 @@ class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -26,9 +27,10 @@ class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message */ private $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. + * 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; @@ -41,7 +43,8 @@ class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message */ private $validate_only = false; /** - * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. @@ -57,20 +60,23 @@ class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on GCP 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. + * 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]. + * 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. @@ -82,7 +88,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -97,7 +104,8 @@ public function getName() } /** - * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -116,9 +124,10 @@ public function setName($var) } /** - * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 2; @@ -130,9 +139,10 @@ public function getAllowMissing() } /** - * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 2; @@ -174,7 +184,8 @@ public function setValidateOnly($var) } /** - * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. @@ -188,7 +199,8 @@ public function getEtag() } /** - * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. diff --git a/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php index 00befc215be1..118b23f993c4 100644 --- a/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php @@ -9,14 +9,15 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Delete message for `AzureClusters.DeleteNodePool` method. + * Delete message for `AzureClusters.DeleteAzureNodePool` method. * * Generated from protobuf message 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. + * 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) @@ -33,16 +34,19 @@ class DeleteAzureNodePoolRequest extends \Google\Protobuf\Internal\Message */ private $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. + * 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; */ private $allow_missing = false; /** - * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. @@ -58,7 +62,8 @@ class DeleteAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -67,12 +72,15 @@ class DeleteAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * 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. + * 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]. + * 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. @@ -84,7 +92,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -99,7 +108,8 @@ public function getName() } /** - * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -146,9 +156,11 @@ public function setValidateOnly($var) } /** - * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 3; @@ -160,9 +172,11 @@ public function getAllowMissing() } /** - * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. * Useful for idempotent deletion. * * Generated from protobuf field bool allow_missing = 3; @@ -178,7 +192,8 @@ public function setAllowMissing($var) } /** - * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. @@ -192,7 +207,8 @@ public function getEtag() } /** - * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. diff --git a/GkeMultiCloud/src/V1/Fleet.php b/GkeMultiCloud/src/V1/Fleet.php index 61997f7332ee..860ebe49c0a4 100644 --- a/GkeMultiCloud/src/V1/Fleet.php +++ b/GkeMultiCloud/src/V1/Fleet.php @@ -22,7 +22,8 @@ class Fleet extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the Fleet host project where this cluster will be registered. + * Required. The name of the Fleet host project where this cluster will be + * registered. * Project names are formatted as * `projects/`. * @@ -30,7 +31,8 @@ class Fleet extends \Google\Protobuf\Internal\Message */ private $project = ''; /** - * Output only. The name of the managed Hub Membership resource associated to this cluster. + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. * Membership names are formatted as * `projects//locations/global/membership/`. * @@ -45,11 +47,13 @@ class Fleet extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $project - * Required. The name of the Fleet host project where this cluster will be registered. + * Required. The name of the Fleet host project where this cluster will be + * registered. * Project names are formatted as * `projects/`. * @type string $membership - * Output only. The name of the managed Hub Membership resource associated to this cluster. + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. * Membership names are formatted as * `projects//locations/global/membership/`. * } @@ -60,7 +64,8 @@ public function __construct($data = NULL) { } /** - * Required. The name of the Fleet host project where this cluster will be registered. + * Required. The name of the Fleet host project where this cluster will be + * registered. * Project names are formatted as * `projects/`. * @@ -73,7 +78,8 @@ public function getProject() } /** - * Required. The name of the Fleet host project where this cluster will be registered. + * Required. The name of the Fleet host project where this cluster will be + * registered. * Project names are formatted as * `projects/`. * @@ -90,7 +96,8 @@ public function setProject($var) } /** - * Output only. The name of the managed Hub Membership resource associated to this cluster. + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. * Membership names are formatted as * `projects//locations/global/membership/`. * @@ -103,7 +110,8 @@ public function getMembership() } /** - * Output only. The name of the managed Hub Membership resource associated to this cluster. + * Output only. The name of the managed Hub Membership resource associated to + * this cluster. * Membership names are formatted as * `projects//locations/global/membership/`. * diff --git a/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php b/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php new file mode 100644 index 000000000000..96668436714f --- /dev/null +++ b/GkeMultiCloud/src/V1/Gapic/AttachedClustersGapicClient.php @@ -0,0 +1,1133 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $attachedCluster = new AttachedCluster(); + * $attachedClusterId = 'attached_cluster_id'; + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'createAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class AttachedClustersGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AttachedClusters'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $attachedClusterNameTemplate; + + private static $attachedServerConfigNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . '/../resources/attached_clusters_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../resources/attached_clusters_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . '/../resources/attached_clusters_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/attached_clusters_rest_client_config.php', + ], + ], + ]; + } + + private static function getAttachedClusterNameTemplate() + { + if (self::$attachedClusterNameTemplate == null) { + self::$attachedClusterNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ); + } + + return self::$attachedClusterNameTemplate; + } + + private static function getAttachedServerConfigNameTemplate() + { + if (self::$attachedServerConfigNameTemplate == null) { + self::$attachedServerConfigNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ); + } + + return self::$attachedServerConfigNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}' + ); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'attachedCluster' => self::getAttachedClusterNameTemplate(), + 'attachedServerConfig' => self::getAttachedServerConfigNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * attached_cluster resource. + * + * @param string $project + * @param string $location + * @param string $attachedCluster + * + * @return string The formatted attached_cluster resource. + */ + public static function attachedClusterName( + $project, + $location, + $attachedCluster + ) { + return self::getAttachedClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'attached_cluster' => $attachedCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * attached_server_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted attached_server_config resource. + */ + public static function attachedServerConfigName($project, $location) + { + return self::getAttachedServerConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster} + * - attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException( + "Template name $template does not exist" + ); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException( + "Input did not match any known format. Input: $formattedName" + ); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse( + $operationName, + $this->getOperationsClient(), + $options + ); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'gkemulticloud.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * on a given GCP project and region. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $attachedCluster = new AttachedCluster(); + * $attachedClusterId = 'attached_cluster_id'; + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'createAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param AttachedCluster $attachedCluster Required. The specification of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAttachedCluster( + $parent, + $attachedCluster, + $attachedClusterId, + array $optionalArgs = [] + ) { + $request = new CreateAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAttachedCluster($attachedCluster); + $request->setAttachedClusterId($attachedClusterId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'CreateAttachedCluster', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Deletes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedName = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + * $operationResponse = $attachedClustersClient->deleteAttachedCluster($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->deleteAttachedCluster($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'deleteAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @type bool $allowMissing + * If set to true, and the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed [Operation][google.longrunning.Operation] will be + * returned. + * + * Useful for idempotent deletion. + * @type bool $ignoreErrors + * If set to true, the deletion of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * @type string $etag + * The current etag of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAttachedCluster($name, array $optionalArgs = []) + { + $request = new DeleteAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + if (isset($optionalArgs['ignoreErrors'])) { + $request->setIgnoreErrors($optionalArgs['ignoreErrors']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'DeleteAttachedCluster', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Generates the install manifest to be installed on the target cluster. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $attachedClusterId = 'attached_cluster_id'; + * $platformVersion = 'platform_version'; + * $response = $attachedClustersClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * @param string $platformVersion Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAttachedClusterInstallManifest( + $parent, + $attachedClusterId, + $platformVersion, + array $optionalArgs = [] + ) { + $request = new GenerateAttachedClusterInstallManifestRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAttachedClusterId($attachedClusterId); + $request->setPlatformVersion($platformVersion); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GenerateAttachedClusterInstallManifest', + GenerateAttachedClusterInstallManifestResponse::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Describes a specific + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedName = $attachedClustersClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + * $response = $attachedClustersClient->getAttachedCluster($formattedName); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to describe. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster + * + * @throws ApiException if the remote call fails + */ + public function getAttachedCluster($name, array $optionalArgs = []) + { + $request = new GetAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetAttachedCluster', + AttachedCluster::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Returns information, such as supported Kubernetes versions, on a given + * Google Cloud location. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedName = $attachedClustersClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + * $response = $attachedClustersClient->getAttachedServerConfig($formattedName); + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the + * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + * resource to describe. + * + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig + * + * @throws ApiException if the remote call fails + */ + public function getAttachedServerConfig($name, array $optionalArgs = []) + { + $request = new GetAttachedServerConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetAttachedServerConfig', + AttachedServerConfig::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Imports creates a new + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * by importing an existing Fleet Membership resource. + * + * Attached Clusters created before the introduction of the Anthos Multi-Cloud + * API can be imported through this method. + * + * If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be + * described to track the status of the operation. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * $fleetMembership = 'fleet_membership'; + * $platformVersion = 'platform_version'; + * $distribution = 'distribution'; + * $operationResponse = $attachedClustersClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'importAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param string $fleetMembership Required. The name of the fleet membership resource to import. + * @param string $platformVersion Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * @param string $distribution Required. The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks"]. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually import the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importAttachedCluster( + $parent, + $fleetMembership, + $platformVersion, + $distribution, + array $optionalArgs = [] + ) { + $request = new ImportAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFleetMembership($fleetMembership); + $request->setPlatformVersion($platformVersion); + $request->setDistribution($distribution); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'ImportAttachedCluster', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + * resources on a given Google Cloud project and region. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $formattedParent = $attachedClustersClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $attachedClustersClient->listAttachedClusters($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $attachedClustersClient->listAttachedClusters($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location which owns this collection of + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAttachedClusters($parent, array $optionalArgs = []) + { + $request = new ListAttachedClustersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListAttachedClusters', + $optionalArgs, + ListAttachedClustersResponse::class, + $request + ); + } + + /** + * Updates an + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + * + * Sample code: + * ``` + * $attachedClustersClient = new AttachedClustersClient(); + * try { + * $attachedCluster = new AttachedCluster(); + * $updateMask = new FieldMask(); + * $operationResponse = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $attachedClustersClient->updateAttachedCluster($attachedCluster, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $attachedClustersClient->resumeOperation($operationName, 'updateAttachedCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $attachedClustersClient->close(); + * } + * ``` + * + * @param AttachedCluster $attachedCluster Required. The + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * to update. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + * + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAttachedCluster( + $attachedCluster, + $updateMask, + array $optionalArgs = [] + ) { + $request = new UpdateAttachedClusterRequest(); + $requestParamHeaders = []; + $request->setAttachedCluster($attachedCluster); + $request->setUpdateMask($updateMask); + $requestParamHeaders[ + 'attached_cluster.name' + ] = $attachedCluster->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'UpdateAttachedCluster', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } +} diff --git a/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php b/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php index 450c38877795..09786478f43d 100644 --- a/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php +++ b/GkeMultiCloud/src/V1/Gapic/AwsClustersGapicClient.php @@ -444,7 +444,8 @@ public function __construct(array $options = []) } /** - * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource on a given GCP project and region. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -488,22 +489,25 @@ public function __construct(array $options = []) * } * ``` * - * @param string $parent Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource - * will be created. + * @param string $parent Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + * created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param AwsCluster $awsCluster Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the parent - * resource. - * - * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource name formatted as + * @param AwsCluster $awsCluster Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + * formatted as * `projects//locations//awsClusters/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @param array $optionalArgs { * Optional. * @@ -550,7 +554,8 @@ public function createAwsCluster( } /** - * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -594,22 +599,25 @@ public function createAwsCluster( * } * ``` * - * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource where this node pool will be created. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param AwsNodePool $awsNodePool Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the parent - * resource. - * - * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource name formatted as + * @param AwsNodePool $awsNodePool Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @param array $optionalArgs { * Optional. * @@ -657,10 +665,11 @@ public function createAwsNodePool( } /** - * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. * - * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources. + * Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -700,7 +709,8 @@ public function createAwsNodePool( * } * ``` * - * @param string $name Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + * @param string $name Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -713,13 +723,15 @@ public function createAwsNodePool( * @type bool $validateOnly * If set, only validate the request, but do not actually delete the resource. * @type bool $allowMissing - * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * 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 string $etag - * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * The current etag of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -768,7 +780,8 @@ public function deleteAwsCluster($name, array $optionalArgs = []) } /** - * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -808,7 +821,8 @@ public function deleteAwsCluster($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + * @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/`. @@ -822,13 +836,15 @@ public function deleteAwsCluster($name, array $optionalArgs = []) * If set, only validate the request, but do not actually delete the node * pool. * @type bool $allowMissing - * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * 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 string $etag - * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * The current ETag of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -891,7 +907,9 @@ public function deleteAwsNodePool($name, array $optionalArgs = []) * } * ``` * - * @param string $awsCluster Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + * @param string $awsCluster Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -934,7 +952,8 @@ public function generateAwsAccessToken( } /** - * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource. * * Sample code: * ``` @@ -947,7 +966,9 @@ public function generateAwsAccessToken( * } * ``` * - * @param string $name Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + * @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/`. @@ -988,7 +1009,8 @@ public function getAwsCluster($name, array $optionalArgs = []) } /** - * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * Describes a specific + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. * * Sample code: * ``` @@ -1001,7 +1023,9 @@ public function getAwsCluster($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + * @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/`. @@ -1056,7 +1080,9 @@ public function getAwsNodePool($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + * @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`. @@ -1097,8 +1123,8 @@ public function getAwsServerConfig($name, array $optionalArgs = []) } /** - * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and - * region. + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * on a given Google Cloud project and region. * * Sample code: * ``` @@ -1181,7 +1207,9 @@ public function listAwsClusters($parent, array $optionalArgs = []) } /** - * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. * * Sample code: * ``` @@ -1304,7 +1332,8 @@ public function listAwsNodePools($parent, array $optionalArgs = []) * } * ``` * - * @param AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update. + * @param AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to update. * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in * this field. The elements of the repeated paths field can only include these * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: @@ -1321,14 +1350,17 @@ public function listAwsNodePools($parent, array $optionalArgs = []) * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. * @param array $optionalArgs { * Optional. * @@ -1412,7 +1444,8 @@ public function updateAwsCluster( * } * ``` * - * @param AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update. + * @param AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in * this field. The elements of the repeated paths field can only include these * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: @@ -1432,6 +1465,13 @@ public function updateAwsCluster( * * `config.proxy_config.secret_version`. * * `config.ssh_config`. * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. * @param array $optionalArgs { * Optional. * diff --git a/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php b/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php index aca41ceb998b..d99b595bf32e 100644 --- a/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php +++ b/GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php @@ -484,8 +484,8 @@ public function __construct(array $options = []) } /** - * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project - * and region. + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource on a given Google Cloud project and region. * * `AzureClient` resources hold client authentication * information needed by the Anthos Multicloud API to manage Azure resources @@ -533,22 +533,25 @@ public function __construct(array $options = []) * } * ``` * - * @param string $parent Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource - * will be created. + * @param string $parent Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + * created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param AzureClient $azureClient Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the parent - * resource. - * - * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource name formatted as + * @param AzureClient $azureClient Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + * formatted as * `projects//locations//azureClients/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @param array $optionalArgs { * Optional. * @@ -595,7 +598,8 @@ public function createAzureClient( } /** - * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource on a given GCP project and region. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -639,22 +643,25 @@ public function createAzureClient( * } * ``` * - * @param string $parent Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource - * will be created. + * @param string $parent Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + * created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param AzureCluster $azureCluster Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the parent - * resource. - * - * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource name formatted as + * @param AzureCluster $azureCluster Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + * formatted as * `projects//locations//azureClusters/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @param array $optionalArgs { * Optional. * @@ -701,7 +708,9 @@ public function createAzureCluster( } /** - * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + * attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -745,21 +754,24 @@ public function createAzureCluster( * } * ``` * - * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource where this node pool will be created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. - * @param AzureNodePool $azureNodePool Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the parent - * resource. - * - * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource name formatted as + * @param AzureNodePool $azureNodePool Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. * @param array $optionalArgs { * Optional. * @@ -807,7 +819,8 @@ public function createAzureNodePool( } /** - * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource. * * If the client is used by one or more clusters, deletion will * fail and a `FAILED_PRECONDITION` error will be returned. @@ -850,9 +863,11 @@ public function createAzureNodePool( * } * ``` * - * @param string $name Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + * @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 + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -861,9 +876,10 @@ public function createAzureNodePool( * Optional. * * @type bool $allowMissing - * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * * Useful for idempotent deletion. * @type bool $validateOnly @@ -907,10 +923,11 @@ public function deleteAzureClient($name, array $optionalArgs = []) } /** - * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * Deletes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * - * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources. + * Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -950,7 +967,8 @@ public function deleteAzureClient($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + * @param string $name Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. * * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. @@ -961,15 +979,17 @@ public function deleteAzureClient($name, array $optionalArgs = []) * Optional. * * @type bool $allowMissing - * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * If set to true, and the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed [Operation][google.longrunning.Operation] will be returned. * * Useful for idempotent deletion. * @type bool $validateOnly * If set, only validate the request, but do not actually delete the resource. * @type string $etag - * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * The current etag of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -1018,7 +1038,8 @@ public function deleteAzureCluster($name, array $optionalArgs = []) } /** - * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * Deletes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. * * If successful, the response contains a newly created * [Operation][google.longrunning.Operation] resource that can be @@ -1058,7 +1079,8 @@ public function deleteAzureCluster($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + * @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/`. @@ -1072,13 +1094,16 @@ public function deleteAzureCluster($name, array $optionalArgs = []) * If set, only validate the request, but do not actually delete the node * pool. * @type bool $allowMissing - * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed [Operation][google.longrunning.Operation] will be returned. + * 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]. + * The current ETag of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -1141,7 +1166,9 @@ public function deleteAzureNodePool($name, array $optionalArgs = []) * } * ``` * - * @param string $azureCluster Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + * @param string $azureCluster Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. * * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. @@ -1184,7 +1211,8 @@ public function generateAzureAccessToken( } /** - * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * Describes a specific + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. * * Sample code: * ``` @@ -1197,9 +1225,12 @@ public function generateAzureAccessToken( * } * ``` * - * @param string $name Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe. + * @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 + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -1238,7 +1269,8 @@ public function getAzureClient($name, array $optionalArgs = []) } /** - * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * Describes a specific + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. * * Sample code: * ``` @@ -1251,7 +1283,9 @@ public function getAzureClient($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + * @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/`. @@ -1292,7 +1326,8 @@ public function getAzureCluster($name, array $optionalArgs = []) } /** - * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * Describes a specific + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. * * Sample code: * ``` @@ -1305,7 +1340,9 @@ public function getAzureCluster($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + * @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/`. @@ -1360,7 +1397,9 @@ public function getAzureNodePool($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + * @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`. @@ -1401,8 +1440,8 @@ public function getAzureServerConfig($name, array $optionalArgs = []) } /** - * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and - * region. + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources on a given Google Cloud project and region. * * Sample code: * ``` @@ -1485,8 +1524,8 @@ public function listAzureClients($parent, array $optionalArgs = []) } /** - * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and - * region. + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources on a given Google Cloud project and region. * * Sample code: * ``` @@ -1569,7 +1608,9 @@ public function listAzureClusters($parent, array $optionalArgs = []) } /** - * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. * * Sample code: * ``` @@ -1692,19 +1733,25 @@ public function listAzureNodePools($parent, array $optionalArgs = []) * } * ``` * - * @param AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update. + * @param AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in * this field. The elements of the repeated paths field can only include these * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: * * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. * @param array $optionalArgs { * Optional. * @@ -1788,7 +1835,8 @@ public function updateAzureCluster( * } * ``` * - * @param AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update. + * @param AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in * this field. The elements of the repeated paths field can only include these * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: @@ -1797,7 +1845,7 @@ public function updateAzureCluster( * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. * @param array $optionalArgs { * Optional. * diff --git a/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php b/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php new file mode 100644 index 000000000000..8ef428eec3a9 --- /dev/null +++ b/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestRequest.php @@ -0,0 +1,208 @@ +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) = { + */ + private $parent = ''; + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * + * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $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]; + */ + private $platform_version = ''; + + /** + * 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 the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * @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]. + * } + */ + 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 the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * + * 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 the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * + * 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; + } + +} + diff --git a/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestResponse.php b/GkeMultiCloud/src/V1/GenerateAttachedClusterInstallManifestResponse.php new file mode 100644 index 000000000000..45932b34d98f --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/GenerateAwsAccessTokenRequest.php b/GkeMultiCloud/src/V1/GenerateAwsAccessTokenRequest.php index d9deb3124d55..0f02d7f840bd 100644 --- a/GkeMultiCloud/src/V1/GenerateAwsAccessTokenRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAwsAccessTokenRequest.php @@ -16,7 +16,9 @@ class GenerateAwsAccessTokenRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GenerateAwsAccessTokenRequest extends \Google\Protobuf\Internal\Message * 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. + * 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) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getAwsCluster() } /** - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * authenticate to. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php b/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php index 3eee106957a6..48792bbbb197 100644 --- a/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php +++ b/GkeMultiCloud/src/V1/GenerateAzureAccessTokenRequest.php @@ -16,7 +16,9 @@ class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message * 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. + * 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) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getAzureCluster() } /** - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * authenticate to. * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GetAttachedClusterRequest.php b/GkeMultiCloud/src/V1/GetAttachedClusterRequest.php new file mode 100644 index 000000000000..350f1e853c5b --- /dev/null +++ b/GkeMultiCloud/src/V1/GetAttachedClusterRequest.php @@ -0,0 +1,91 @@ +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 GCP resource names. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $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 GCP 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 GCP 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 GCP 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/GkeMultiCloud/src/V1/GetAttachedServerConfigRequest.php b/GkeMultiCloud/src/V1/GetAttachedServerConfigRequest.php new file mode 100644 index 000000000000..8f0b463f18ce --- /dev/null +++ b/GkeMultiCloud/src/V1/GetAttachedServerConfigRequest.php @@ -0,0 +1,92 @@ +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) = { + */ + private $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/GkeMultiCloud/src/V1/GetAwsClusterRequest.php b/GkeMultiCloud/src/V1/GetAwsClusterRequest.php index f01b323235fb..c3185122fb5b 100644 --- a/GkeMultiCloud/src/V1/GetAwsClusterRequest.php +++ b/GkeMultiCloud/src/V1/GetAwsClusterRequest.php @@ -16,7 +16,9 @@ class GetAwsClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GetAwsClusterRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getName() } /** - * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + * Required. The name of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + * describe. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GetAwsNodePoolRequest.php b/GkeMultiCloud/src/V1/GetAwsNodePoolRequest.php index ddc3c0072468..0f57213bb1ce 100644 --- a/GkeMultiCloud/src/V1/GetAwsNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/GetAwsNodePoolRequest.php @@ -16,7 +16,9 @@ class GetAwsNodePoolRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GetAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getName() } /** - * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + * Required. The name of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + * describe. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GetAwsServerConfigRequest.php b/GkeMultiCloud/src/V1/GetAwsServerConfigRequest.php index b5be757d5023..14bd0a54aef5 100644 --- a/GkeMultiCloud/src/V1/GetAwsServerConfigRequest.php +++ b/GkeMultiCloud/src/V1/GetAwsServerConfigRequest.php @@ -16,7 +16,9 @@ class GetAwsServerConfigRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GetAwsServerConfigRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getName() } /** - * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + * Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + * to describe. * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GetAzureClientRequest.php b/GkeMultiCloud/src/V1/GetAzureClientRequest.php index c144c586e985..6bd856707aa7 100644 --- a/GkeMultiCloud/src/V1/GetAzureClientRequest.php +++ b/GkeMultiCloud/src/V1/GetAzureClientRequest.php @@ -16,8 +16,11 @@ 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 + * 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. @@ -33,8 +36,11 @@ class GetAzureClientRequest extends \Google\Protobuf\Internal\Message * 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 + * 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. @@ -46,8 +52,11 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. @@ -61,8 +70,11 @@ public function getName() } /** - * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * Required. The name of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + * describe. + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + * formatted as * `projects//locations//azureClients/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. diff --git a/GkeMultiCloud/src/V1/GetAzureClusterRequest.php b/GkeMultiCloud/src/V1/GetAzureClusterRequest.php index e28b1b004a2d..0fab9ef53cd2 100644 --- a/GkeMultiCloud/src/V1/GetAzureClusterRequest.php +++ b/GkeMultiCloud/src/V1/GetAzureClusterRequest.php @@ -16,7 +16,9 @@ class GetAzureClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GetAzureClusterRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getName() } /** - * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + * Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + * describe. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GetAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/GetAzureNodePoolRequest.php index ed405cdb52ed..280bcba5691f 100644 --- a/GkeMultiCloud/src/V1/GetAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/GetAzureNodePoolRequest.php @@ -16,7 +16,9 @@ class GetAzureNodePoolRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GetAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getName() } /** - * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + * Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + * describe. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/GetAzureServerConfigRequest.php b/GkeMultiCloud/src/V1/GetAzureServerConfigRequest.php index a30184ee8aa0..d3067f5c4acb 100644 --- a/GkeMultiCloud/src/V1/GetAzureServerConfigRequest.php +++ b/GkeMultiCloud/src/V1/GetAzureServerConfigRequest.php @@ -16,7 +16,9 @@ class GetAzureServerConfigRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -33,7 +35,9 @@ class GetAzureServerConfigRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -46,7 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -61,7 +67,9 @@ public function getName() } /** - * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + * Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + * resource to describe. * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. * See [Resource Names](https://cloud.google.com/apis/design/resource_names) diff --git a/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php b/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php new file mode 100644 index 000000000000..bc11c4ca0d0f --- /dev/null +++ b/GkeMultiCloud/src/V1/ImportAttachedClusterRequest.php @@ -0,0 +1,239 @@ +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) = { + */ + private $parent = ''; + /** + * If set, only validate the request, but do not actually import the cluster. + * + * Generated from protobuf field bool validate_only = 2; + */ + private $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]; + */ + private $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]; + */ + private $platform_version = ''; + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $distribution = ''; + + /** + * 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"]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location where this + * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If set, only validate the request, but do not actually import the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, only validate the request, but do not actually import the cluster. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Required. The name of the fleet membership resource to import. + * + * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFleetMembership() + { + return $this->fleet_membership; + } + + /** + * Required. The name of the fleet membership resource to import. + * + * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFleetMembership($var) + { + GPBUtil::checkString($var, True); + $this->fleet_membership = $var; + + return $this; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlatformVersion() + { + return $this->platform_version; + } + + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + * + * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlatformVersion($var) + { + GPBUtil::checkString($var, True); + $this->platform_version = $var; + + return $this; + } + + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDistribution() + { + return $this->distribution; + } + + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: ["eks", "aks"]. + * + * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDistribution($var) + { + GPBUtil::checkString($var, True); + $this->distribution = $var; + + return $this; + } + +} + diff --git a/GkeMultiCloud/src/V1/ListAttachedClustersRequest.php b/GkeMultiCloud/src/V1/ListAttachedClustersRequest.php new file mode 100644 index 000000000000..d87611a2f106 --- /dev/null +++ b/GkeMultiCloud/src/V1/ListAttachedClustersRequest.php @@ -0,0 +1,179 @@ +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 GCP resource names. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $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; + */ + private $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; + */ + private $page_token = ''; + + /** + * 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 GCP 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 GCP 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 GCP 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/GkeMultiCloud/src/V1/ListAttachedClustersResponse.php b/GkeMultiCloud/src/V1/ListAttachedClustersResponse.php new file mode 100644 index 000000000000..08827a9d03e2 --- /dev/null +++ b/GkeMultiCloud/src/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 GCP 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; + */ + private $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 GCP 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 GCP 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 GCP 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/GkeMultiCloud/src/V1/ListAwsClustersRequest.php b/GkeMultiCloud/src/V1/ListAwsClustersRequest.php index 51d9a414aa28..7e6d5eef69d9 100644 --- a/GkeMultiCloud/src/V1/ListAwsClustersRequest.php +++ b/GkeMultiCloud/src/V1/ListAwsClustersRequest.php @@ -30,15 +30,16 @@ class ListAwsClustersRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; */ private $page_size = 0; /** * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any. + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. * * Generated from protobuf field string page_token = 3; */ @@ -61,11 +62,12 @@ class ListAwsClustersRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * @type string $page_token * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any. + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. * } */ public function __construct($data = NULL) { @@ -112,8 +114,8 @@ public function setParent($var) * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @return int @@ -128,8 +130,8 @@ public function getPageSize() * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @param int $var @@ -145,7 +147,8 @@ public function setPageSize($var) /** * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any. + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. * * Generated from protobuf field string page_token = 3; * @return string @@ -157,7 +160,8 @@ public function getPageToken() /** * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any. + * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + * request, if any. * * Generated from protobuf field string page_token = 3; * @param string $var diff --git a/GkeMultiCloud/src/V1/ListAwsClustersResponse.php b/GkeMultiCloud/src/V1/ListAwsClustersResponse.php index f0beaa434365..8c9880f1cdcc 100644 --- a/GkeMultiCloud/src/V1/ListAwsClustersResponse.php +++ b/GkeMultiCloud/src/V1/ListAwsClustersResponse.php @@ -16,8 +16,8 @@ class ListAwsClustersResponse extends \Google\Protobuf\Internal\Message { /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP - * project and region region. + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified GCP project and region region. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; */ @@ -37,8 +37,8 @@ class ListAwsClustersResponse extends \Google\Protobuf\Internal\Message * 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 GCP - * project and region region. + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified GCP 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. @@ -50,8 +50,8 @@ public function __construct($data = NULL) { } /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP - * project and region region. + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified GCP project and region region. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -62,8 +62,8 @@ public function getAwsClusters() } /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP - * project and region region. + * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + * in the specified GCP project and region region. * * 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 diff --git a/GkeMultiCloud/src/V1/ListAwsNodePoolsRequest.php b/GkeMultiCloud/src/V1/ListAwsNodePoolsRequest.php index 345e7ec75192..4a124caab83b 100644 --- a/GkeMultiCloud/src/V1/ListAwsNodePoolsRequest.php +++ b/GkeMultiCloud/src/V1/ListAwsNodePoolsRequest.php @@ -31,15 +31,16 @@ class ListAwsNodePoolsRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; */ private $page_size = 0; /** * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any. + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. * * Generated from protobuf field string page_token = 3; */ @@ -63,11 +64,12 @@ class ListAwsNodePoolsRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * @type string $page_token * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any. + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. * } */ public function __construct($data = NULL) { @@ -116,8 +118,8 @@ public function setParent($var) * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @return int @@ -132,8 +134,8 @@ public function getPageSize() * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @param int $var @@ -149,7 +151,8 @@ public function setPageSize($var) /** * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any. + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. * * Generated from protobuf field string page_token = 3; * @return string @@ -161,7 +164,8 @@ public function getPageToken() /** * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any. + * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + * request, if any. * * Generated from protobuf field string page_token = 3; * @param string $var diff --git a/GkeMultiCloud/src/V1/ListAwsNodePoolsResponse.php b/GkeMultiCloud/src/V1/ListAwsNodePoolsResponse.php index ea5168ce9960..446a5a397710 100644 --- a/GkeMultiCloud/src/V1/ListAwsNodePoolsResponse.php +++ b/GkeMultiCloud/src/V1/ListAwsNodePoolsResponse.php @@ -16,7 +16,8 @@ class ListAwsNodePoolsResponse extends \Google\Protobuf\Internal\Message { /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`. + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; */ @@ -36,7 +37,8 @@ class ListAwsNodePoolsResponse extends \Google\Protobuf\Internal\Message * 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`. + * 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. @@ -48,7 +50,8 @@ public function __construct($data = NULL) { } /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`. + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -59,7 +62,8 @@ public function getAwsNodePools() } /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`. + * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resources in the specified `AwsCluster`. * * 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 diff --git a/GkeMultiCloud/src/V1/ListAzureClientsRequest.php b/GkeMultiCloud/src/V1/ListAzureClientsRequest.php index d088f7730d86..c6410d639c93 100644 --- a/GkeMultiCloud/src/V1/ListAzureClientsRequest.php +++ b/GkeMultiCloud/src/V1/ListAzureClientsRequest.php @@ -30,15 +30,16 @@ class ListAzureClientsRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; */ private $page_size = 0; /** * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any. + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. * * Generated from protobuf field string page_token = 3; */ @@ -61,11 +62,12 @@ class ListAzureClientsRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. * @type string $page_token * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any. + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. * } */ public function __construct($data = NULL) { @@ -112,8 +114,8 @@ public function setParent($var) * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @return int @@ -128,8 +130,8 @@ public function getPageSize() * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @param int $var @@ -145,7 +147,8 @@ public function setPageSize($var) /** * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any. + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. * * Generated from protobuf field string page_token = 3; * @return string @@ -157,7 +160,8 @@ public function getPageToken() /** * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any. + * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + * request, if any. * * Generated from protobuf field string page_token = 3; * @param string $var diff --git a/GkeMultiCloud/src/V1/ListAzureClientsResponse.php b/GkeMultiCloud/src/V1/ListAzureClientsResponse.php index 520436bedbaa..a88567069e3c 100644 --- a/GkeMultiCloud/src/V1/ListAzureClientsResponse.php +++ b/GkeMultiCloud/src/V1/ListAzureClientsResponse.php @@ -16,8 +16,8 @@ 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. + * 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; */ @@ -37,8 +37,8 @@ class ListAzureClientsResponse extends \Google\Protobuf\Internal\Message * 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. + * 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. @@ -50,8 +50,8 @@ public function __construct($data = NULL) { } /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud - * project and region region. + * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources in the specified Google Cloud project and region region. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -62,8 +62,8 @@ public function getAzureClients() } /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud - * project and region region. + * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resources in the specified Google Cloud project and region region. * * 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 diff --git a/GkeMultiCloud/src/V1/ListAzureClustersRequest.php b/GkeMultiCloud/src/V1/ListAzureClustersRequest.php index 56eb7471faf3..0b0854e8fbfe 100644 --- a/GkeMultiCloud/src/V1/ListAzureClustersRequest.php +++ b/GkeMultiCloud/src/V1/ListAzureClustersRequest.php @@ -30,15 +30,16 @@ class ListAzureClustersRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; */ private $page_size = 0; /** * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any. + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. * * Generated from protobuf field string page_token = 3; */ @@ -61,11 +62,12 @@ class ListAzureClustersRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * @type string $page_token * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any. + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. * } */ public function __construct($data = NULL) { @@ -112,8 +114,8 @@ public function setParent($var) * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @return int @@ -128,8 +130,8 @@ public function getPageSize() * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @param int $var @@ -145,7 +147,8 @@ public function setPageSize($var) /** * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any. + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. * * Generated from protobuf field string page_token = 3; * @return string @@ -157,7 +160,8 @@ public function getPageToken() /** * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any. + * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + * request, if any. * * Generated from protobuf field string page_token = 3; * @param string $var diff --git a/GkeMultiCloud/src/V1/ListAzureClustersResponse.php b/GkeMultiCloud/src/V1/ListAzureClustersResponse.php index 94b30f2eca69..dd186fcff58c 100644 --- a/GkeMultiCloud/src/V1/ListAzureClustersResponse.php +++ b/GkeMultiCloud/src/V1/ListAzureClustersResponse.php @@ -16,8 +16,8 @@ class ListAzureClustersResponse extends \Google\Protobuf\Internal\Message { /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP - * project and region region. + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified GCP project and region region. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; */ @@ -37,8 +37,8 @@ class ListAzureClustersResponse extends \Google\Protobuf\Internal\Message * 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 GCP - * project and region region. + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified GCP 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. @@ -50,8 +50,8 @@ public function __construct($data = NULL) { } /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP - * project and region region. + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified GCP project and region region. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -62,8 +62,8 @@ public function getAzureClusters() } /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP - * project and region region. + * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resources in the specified GCP project and region region. * * 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 diff --git a/GkeMultiCloud/src/V1/ListAzureNodePoolsRequest.php b/GkeMultiCloud/src/V1/ListAzureNodePoolsRequest.php index 13c30ff063c1..7db6022e2813 100644 --- a/GkeMultiCloud/src/V1/ListAzureNodePoolsRequest.php +++ b/GkeMultiCloud/src/V1/ListAzureNodePoolsRequest.php @@ -31,15 +31,16 @@ class ListAzureNodePoolsRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; */ private $page_size = 0; /** * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any. + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. * * Generated from protobuf field string page_token = 3; */ @@ -63,11 +64,12 @@ class ListAzureNodePoolsRequest extends \Google\Protobuf\Internal\Message * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * @type string $page_token * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any. + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. * } */ public function __construct($data = NULL) { @@ -116,8 +118,8 @@ public function setParent($var) * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @return int @@ -132,8 +134,8 @@ public function getPageSize() * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if - * there are more instances left to be queried. + * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + * to determine if there are more instances left to be queried. * * Generated from protobuf field int32 page_size = 2; * @param int $var @@ -149,7 +151,8 @@ public function setPageSize($var) /** * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any. + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. * * Generated from protobuf field string page_token = 3; * @return string @@ -161,7 +164,8 @@ public function getPageToken() /** * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any. + * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + * request, if any. * * Generated from protobuf field string page_token = 3; * @param string $var diff --git a/GkeMultiCloud/src/V1/ListAzureNodePoolsResponse.php b/GkeMultiCloud/src/V1/ListAzureNodePoolsResponse.php index 6fff7af46fa2..45566908cfa6 100644 --- a/GkeMultiCloud/src/V1/ListAzureNodePoolsResponse.php +++ b/GkeMultiCloud/src/V1/ListAzureNodePoolsResponse.php @@ -16,7 +16,8 @@ class ListAzureNodePoolsResponse extends \Google\Protobuf\Internal\Message { /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`. + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; */ @@ -36,7 +37,8 @@ class ListAzureNodePoolsResponse extends \Google\Protobuf\Internal\Message * 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`. + * 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. @@ -48,7 +50,8 @@ public function __construct($data = NULL) { } /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`. + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. * * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -59,7 +62,8 @@ public function getAzureNodePools() } /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`. + * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resources in the specified `AzureCluster`. * * 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 diff --git a/GkeMultiCloud/src/V1/ManagedPrometheusConfig.php b/GkeMultiCloud/src/V1/ManagedPrometheusConfig.php new file mode 100644 index 000000000000..5df2f24b1965 --- /dev/null +++ b/GkeMultiCloud/src/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; + */ + private $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/GkeMultiCloud/src/V1/MonitoringConfig.php b/GkeMultiCloud/src/V1/MonitoringConfig.php new file mode 100644 index 000000000000..491f19a758f0 --- /dev/null +++ b/GkeMultiCloud/src/V1/MonitoringConfig.php @@ -0,0 +1,77 @@ +google.cloud.gkemulticloud.v1.MonitoringConfig + */ +class MonitoringConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; + */ + private $managed_prometheus_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $managed_prometheus_config + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); + parent::__construct($data); + } + + /** + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; + * @return \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig|null + */ + public function getManagedPrometheusConfig() + { + return $this->managed_prometheus_config; + } + + public function hasManagedPrometheusConfig() + { + return isset($this->managed_prometheus_config); + } + + public function clearManagedPrometheusConfig() + { + unset($this->managed_prometheus_config); + } + + /** + * Enable Google Cloud Managed Service for Prometheus in the cluster. + * + * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; + * @param \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $var + * @return $this + */ + public function setManagedPrometheusConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig::class); + $this->managed_prometheus_config = $var; + + return $this; + } + +} + diff --git a/GkeMultiCloud/src/V1/OperationMetadata.php b/GkeMultiCloud/src/V1/OperationMetadata.php index d73be6a4e655..a5588e59ab19 100644 --- a/GkeMultiCloud/src/V1/OperationMetadata.php +++ b/GkeMultiCloud/src/V1/OperationMetadata.php @@ -40,11 +40,29 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message */ private $status_detail = ''; /** - * Output only. Human-readable status of any error that occurred during the operation. + * Output only. Human-readable status of any error that occurred during the + * operation. * * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $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]; + */ + private $verb = ''; + /** + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $requested_cancellation = false; /** * Constructor. @@ -61,7 +79,17 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message * @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. + * Output only. Human-readable status of any error that occurred during the + * operation. + * @type string $verb + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * @type bool $requested_cancellation + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. * } */ public function __construct($data = NULL) { @@ -194,7 +222,8 @@ public function setStatusDetail($var) } /** - * Output only. Human-readable status of any error that occurred during the operation. + * Output only. Human-readable status of any error that occurred during the + * operation. * * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -205,7 +234,8 @@ public function getErrorDetail() } /** - * Output only. Human-readable status of any error that occurred during the operation. + * Output only. Human-readable status of any error that occurred during the + * operation. * * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -219,5 +249,67 @@ public function setErrorDetail($var) return $this; } + /** + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * + * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. The verb associated with the API method which triggered this + * operation. Possible values are "create", "delete", "update" and "import". + * + * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether it has been requested cancellation + * for the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + } diff --git a/GkeMultiCloud/src/V1/ReplicaPlacement.php b/GkeMultiCloud/src/V1/ReplicaPlacement.php index d4a7487c292f..f817881ea2bd 100644 --- a/GkeMultiCloud/src/V1/ReplicaPlacement.php +++ b/GkeMultiCloud/src/V1/ReplicaPlacement.php @@ -16,16 +16,16 @@ 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. + * 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]; */ private $subnet_id = ''; /** - * Required. For a given replica, the Azure availability zone where to provision the - * control plane VM and the ETCD disk. + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. * * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,12 +38,12 @@ class ReplicaPlacement extends \Google\Protobuf\Internal\Message * 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. + * 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. + * 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) { @@ -52,9 +52,9 @@ public function __construct($data = NULL) { } /** - * Required. For a given replica, the ARM ID of the subnet where the control plane VM is - * deployed. Make sure it's a subnet under the virtual network in the cluster - * configuration. + * Required. For a given replica, the ARM ID of the subnet where the control + * plane VM is deployed. Make sure it's a subnet under the virtual network in + * the cluster configuration. * * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -65,9 +65,9 @@ public function getSubnetId() } /** - * Required. For a given replica, the ARM ID of the subnet where the control plane VM is - * deployed. Make sure it's a subnet under the virtual network in the cluster - * configuration. + * Required. For a given replica, the ARM ID of the subnet where the control + * plane VM is deployed. Make sure it's a subnet under the virtual network in + * the cluster configuration. * * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -82,8 +82,8 @@ public function setSubnetId($var) } /** - * Required. For a given replica, the Azure availability zone where to provision the - * control plane VM and the ETCD disk. + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. * * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -94,8 +94,8 @@ public function getAzureAvailabilityZone() } /** - * Required. For a given replica, the Azure availability zone where to provision the - * control plane VM and the ETCD disk. + * Required. For a given replica, the Azure availability zone where to + * provision the control plane VM and the ETCD disk. * * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php b/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php new file mode 100644 index 000000000000..1fe3553467e9 --- /dev/null +++ b/GkeMultiCloud/src/V1/UpdateAttachedClusterRequest.php @@ -0,0 +1,199 @@ +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]; + */ + private $attached_cluster = null; + /** + * If set, only validate the request, but do not actually update the cluster. + * + * Generated from protobuf field bool validate_only = 2; + */ + private $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]: + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $update_mask = null; + + /** + * 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]: + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_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]: + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_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]: + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_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/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php b/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php index d18e2613027b..fe65ffffd6fd 100644 --- a/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAwsClusterRequest.php @@ -16,7 +16,8 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update. + * 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]; */ @@ -43,14 +44,17 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; */ @@ -63,7 +67,8 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * 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. + * 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 @@ -82,14 +87,17 @@ class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. * } */ public function __construct($data = NULL) { @@ -98,7 +106,8 @@ public function __construct($data = NULL) { } /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update. + * 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 @@ -119,7 +128,8 @@ public function clearAwsCluster() } /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update. + * 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 @@ -175,14 +185,17 @@ public function setValidateOnly($var) * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -218,14 +231,17 @@ public function clearUpdateMask() * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php b/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php index 611c4a21bbfb..a514f1ceda50 100644 --- a/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAwsNodePoolRequest.php @@ -16,7 +16,8 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update. + * 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]; */ @@ -46,6 +47,13 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * * `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`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -58,7 +66,8 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * 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. + * 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 @@ -80,6 +89,13 @@ class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message * * `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`. * } */ public function __construct($data = NULL) { @@ -88,7 +104,8 @@ public function __construct($data = NULL) { } /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update. + * 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 @@ -109,7 +126,8 @@ public function clearAwsNodePool() } /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update. + * 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 @@ -168,6 +186,13 @@ public function setValidateOnly($var) * * `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`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -206,6 +231,13 @@ public function clearUpdateMask() * * `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`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php b/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php index c039c0f1564f..4ce2b225230e 100644 --- a/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAzureClusterRequest.php @@ -16,7 +16,8 @@ class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update. + * 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]; */ @@ -32,13 +33,18 @@ class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message * this field. The elements of the repeated paths field can only include these * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; */ @@ -51,7 +57,8 @@ class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message * 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. + * 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 @@ -59,13 +66,18 @@ class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message * this field. The elements of the repeated paths field can only include these * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. * } */ public function __construct($data = NULL) { @@ -74,7 +86,8 @@ public function __construct($data = NULL) { } /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update. + * 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 @@ -95,7 +108,8 @@ public function clearAzureCluster() } /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update. + * 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 @@ -140,13 +154,18 @@ public function setValidateOnly($var) * this field. The elements of the repeated paths field can only include these * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -171,13 +190,18 @@ public function clearUpdateMask() * this field. The elements of the repeated paths field can only include these * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php b/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php index e882d7a7dd0d..3221a2fc59fc 100644 --- a/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php +++ b/GkeMultiCloud/src/V1/UpdateAzureNodePoolRequest.php @@ -16,7 +16,8 @@ class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update. + * 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]; */ @@ -35,7 +36,7 @@ class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -48,7 +49,8 @@ class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * 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. + * 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 @@ -59,7 +61,7 @@ class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. * } */ public function __construct($data = NULL) { @@ -68,7 +70,8 @@ public function __construct($data = NULL) { } /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update. + * 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 @@ -89,7 +92,8 @@ public function clearAzureNodePool() } /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update. + * 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 @@ -137,7 +141,7 @@ public function setValidateOnly($var) * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -165,7 +169,7 @@ public function clearUpdateMask() * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/GkeMultiCloud/src/V1/gapic_metadata.json b/GkeMultiCloud/src/V1/gapic_metadata.json index 0ec311c2d7d0..a69240b06fba 100644 --- a/GkeMultiCloud/src/V1/gapic_metadata.json +++ b/GkeMultiCloud/src/V1/gapic_metadata.json @@ -5,6 +5,55 @@ "protoPackage": "google.cloud.gkemulticloud.v1", "libraryPackage": "Google\\Cloud\\GkeMultiCloud\\V1", "services": { + "AttachedClusters": { + "clients": { + "grpc": { + "libraryClient": "AttachedClustersGapicClient", + "rpcs": { + "CreateAttachedCluster": { + "methods": [ + "createAttachedCluster" + ] + }, + "DeleteAttachedCluster": { + "methods": [ + "deleteAttachedCluster" + ] + }, + "GenerateAttachedClusterInstallManifest": { + "methods": [ + "generateAttachedClusterInstallManifest" + ] + }, + "GetAttachedCluster": { + "methods": [ + "getAttachedCluster" + ] + }, + "GetAttachedServerConfig": { + "methods": [ + "getAttachedServerConfig" + ] + }, + "ImportAttachedCluster": { + "methods": [ + "importAttachedCluster" + ] + }, + "ListAttachedClusters": { + "methods": [ + "listAttachedClusters" + ] + }, + "UpdateAttachedCluster": { + "methods": [ + "updateAttachedCluster" + ] + } + } + } + } + }, "AwsClusters": { "clients": { "grpc": { diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json b/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json new file mode 100644 index 000000000000..79c17065c97a --- /dev/null +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_client_config.json @@ -0,0 +1,84 @@ +{ + "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" + }, + "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/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php new file mode 100644 index 000000000000..7fd39638c34b --- /dev/null +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php @@ -0,0 +1,58 @@ + [ + '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', + ], + ], + 'DeleteAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ImportAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateAttachedCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', + 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListAttachedClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachedClusters', + ], + ], + ], + ], +]; diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php new file mode 100644 index 000000000000..5d9c3003ee17 --- /dev/null +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php @@ -0,0 +1,153 @@ + [ + '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', + ], + ], + ], + ], + '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/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php new file mode 100644 index 000000000000..2de09dd4ce09 --- /dev/null +++ b/GkeMultiCloud/tests/Unit/V1/AttachedClustersClientTest.php @@ -0,0 +1,930 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AttachedClustersClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AttachedClustersClient($options); + } + + /** @test */ + public function createAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $response = $gapicClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $attachedClusterId = 'attachedClusterId-249426181'; + $response = $gapicClient->createAttachedCluster($formattedParent, $attachedCluster, $attachedClusterId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $response = $gapicClient->deleteAttachedCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $response = $gapicClient->deleteAttachedCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterInstallManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $manifest = 'manifest130625071'; + $expectedResponse = new GenerateAttachedClusterInstallManifestResponse(); + $expectedResponse->setManifest($manifest); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = 'attachedClusterId-249426181'; + $platformVersion = 'platformVersion1813514508'; + $response = $gapicClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAttachedClusterId(); + $this->assertProtobufEquals($attachedClusterId, $actualValue); + $actualValue = $actualRequestObject->getPlatformVersion(); + $this->assertProtobufEquals($platformVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAttachedClusterInstallManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $attachedClusterId = 'attachedClusterId-249426181'; + $platformVersion = 'platformVersion1813514508'; + try { + $gapicClient->generateAttachedClusterInstallManifest($formattedParent, $attachedClusterId, $platformVersion); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + $response = $gapicClient->getAttachedCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); + try { + $gapicClient->getAttachedCluster($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AttachedServerConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getAttachedServerConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachedServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->getAttachedServerConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion2 = 'platformVersion2-969276993'; + $distribution2 = 'distribution21357826359'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion2); + $expectedResponse->setDistribution($distribution2); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = 'fleetMembership1817977703'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $response = $gapicClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFleetMembership(); + $this->assertProtobufEquals($fleetMembership, $actualValue); + $actualValue = $actualApiRequestObject->getPlatformVersion(); + $this->assertProtobufEquals($platformVersion, $actualValue); + $actualValue = $actualApiRequestObject->getDistribution(); + $this->assertProtobufEquals($distribution, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleetMembership = 'fleetMembership1817977703'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $response = $gapicClient->importAttachedCluster($formattedParent, $fleetMembership, $platformVersion, $distribution); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listAttachedClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachedClustersElement = new AttachedCluster(); + $attachedClusters = [ + $attachedClustersElement, + ]; + $expectedResponse = new ListAttachedClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachedClusters($attachedClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listAttachedClusters($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachedClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachedClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listAttachedClusters($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAttachedClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $platformVersion = 'platformVersion1813514508'; + $distribution = 'distribution-1580708220'; + $clusterRegion = 'clusterRegion993903833'; + $uid = 'uid115792'; + $reconciling = false; + $etag = 'etag3123477'; + $kubernetesVersion = 'kubernetesVersion50850015'; + $expectedResponse = new AttachedCluster(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPlatformVersion($platformVersion); + $expectedResponse->setDistribution($distribution); + $expectedResponse->setClusterRegion($clusterRegion); + $expectedResponse->setUid($uid); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $expectedResponse->setKubernetesVersion($kubernetesVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAttachedClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAttachedCluster($attachedCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAttachedCluster(); + $this->assertProtobufEquals($attachedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAttachedClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAttachedClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $attachedCluster = new AttachedCluster(); + $attachedClusterOidcConfig = new AttachedOidcConfig(); + $attachedCluster->setOidcConfig($attachedClusterOidcConfig); + $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; + $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); + $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; + $attachedCluster->setDistribution($attachedClusterDistribution); + $attachedClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $attachedClusterFleet->setProject($fleetProject); + $attachedCluster->setFleet($attachedClusterFleet); + $updateMask = new FieldMask(); + $response = $gapicClient->updateAttachedCluster($attachedCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php index 3dd1bc88afa1..0896a1d01b38 100644 --- a/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/AwsClustersClientTest.php @@ -39,6 +39,7 @@ use Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling; use Google\Cloud\GkeMultiCloud\V1\AwsServerConfig; use Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication; +use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse; use Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse; use Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse; @@ -161,6 +162,10 @@ public function createAwsClusterTest() $authorizationAdminUsers = []; $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); $awsClusterId = 'awsClusterId938438658'; $response = $gapicClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); $this->assertFalse($response->isDone()); @@ -265,6 +270,10 @@ public function createAwsClusterExceptionTest() $authorizationAdminUsers = []; $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); $awsClusterId = 'awsClusterId938438658'; $response = $gapicClient->createAwsCluster($formattedParent, $awsCluster, $awsClusterId); $this->assertFalse($response->isDone()); @@ -1184,6 +1193,10 @@ public function updateAwsClusterTest() $authorizationAdminUsers = []; $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); $updateMask = new FieldMask(); $response = $gapicClient->updateAwsCluster($awsCluster, $updateMask); $this->assertFalse($response->isDone()); @@ -1285,6 +1298,10 @@ public function updateAwsClusterExceptionTest() $authorizationAdminUsers = []; $awsClusterAuthorization->setAdminUsers($authorizationAdminUsers); $awsCluster->setAuthorization($awsClusterAuthorization); + $awsClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $awsClusterFleet->setProject($fleetProject); + $awsCluster->setFleet($awsClusterFleet); $updateMask = new FieldMask(); $response = $gapicClient->updateAwsCluster($awsCluster, $updateMask); $this->assertFalse($response->isDone()); diff --git a/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php b/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php index cb91b1e5c513..8141f41b1b98 100644 --- a/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php +++ b/GkeMultiCloud/tests/Unit/V1/AzureClustersClientTest.php @@ -38,6 +38,7 @@ use Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling; use Google\Cloud\GkeMultiCloud\V1\AzureServerConfig; use Google\Cloud\GkeMultiCloud\V1\AzureSshConfig; +use Google\Cloud\GkeMultiCloud\V1\Fleet; use Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse; use Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse; use Google\Cloud\GkeMultiCloud\V1\ListAzureClustersResponse; @@ -300,6 +301,10 @@ public function createAzureClusterTest() $authorizationAdminUsers = []; $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); $azureClusterId = 'azureClusterId332577072'; $response = $gapicClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); $this->assertFalse($response->isDone()); @@ -396,6 +401,10 @@ public function createAzureClusterExceptionTest() $authorizationAdminUsers = []; $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); $azureClusterId = 'azureClusterId332577072'; $response = $gapicClient->createAzureCluster($formattedParent, $azureCluster, $azureClusterId); $this->assertFalse($response->isDone()); @@ -1568,6 +1577,10 @@ public function updateAzureClusterTest() $authorizationAdminUsers = []; $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); $updateMask = new FieldMask(); $response = $gapicClient->updateAzureCluster($azureCluster, $updateMask); $this->assertFalse($response->isDone()); @@ -1661,6 +1674,10 @@ public function updateAzureClusterExceptionTest() $authorizationAdminUsers = []; $azureClusterAuthorization->setAdminUsers($authorizationAdminUsers); $azureCluster->setAuthorization($azureClusterAuthorization); + $azureClusterFleet = new Fleet(); + $fleetProject = 'fleetProject604893675'; + $azureClusterFleet->setProject($fleetProject); + $azureCluster->setFleet($azureClusterFleet); $updateMask = new FieldMask(); $response = $gapicClient->updateAzureCluster($azureCluster, $updateMask); $this->assertFalse($response->isDone());