diff --git a/AiPlatform/metadata/V1/DatasetService.php b/AiPlatform/metadata/V1/DatasetService.php
index 226fe9ce5647..8808e795c3cb 100644
Binary files a/AiPlatform/metadata/V1/DatasetService.php and b/AiPlatform/metadata/V1/DatasetService.php differ
diff --git a/AiPlatform/metadata/V1/DatasetVersion.php b/AiPlatform/metadata/V1/DatasetVersion.php
new file mode 100644
index 000000000000..ec2c2b7b26c5
--- /dev/null
+++ b/AiPlatform/metadata/V1/DatasetVersion.php
@@ -0,0 +1,37 @@
+internalAddGeneratedFile(
+ '
+
+0google/cloud/aiplatform/v1/dataset_version.protogoogle.cloud.aiplatform.v1google/api/resource.protogoogle/protobuf/timestamp.proto"
+DatasetVersion
+name ( BA4
+create_time (2.google.protobuf.TimestampBA4
+update_time (2.google.protobuf.TimestampBA
+etag ( #
+big_query_dataset_name ( BA:A
+(aiplatform.googleapis.com/DatasetVersion\\projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}B
+com.google.cloud.aiplatform.v1BDatasetVersionProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbGoogle.Cloud.AIPlatform.V1Google\\Cloud\\AIPlatform\\V1Google::Cloud::AIPlatform::V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/AiPlatform/metadata/V1/MachineResources.php b/AiPlatform/metadata/V1/MachineResources.php
index 3c5bc0e41a71..1e8653307b18 100644
--- a/AiPlatform/metadata/V1/MachineResources.php
+++ b/AiPlatform/metadata/V1/MachineResources.php
@@ -18,7 +18,8 @@ public static function initOnce() {
\GPBMetadata\Google\Cloud\Aiplatform\V1\AcceleratorType::initOnce();
$pool->internalAddGeneratedFile(
'
-
+
+
2google/cloud/aiplatform/v1/machine_resources.protogoogle.cloud.aiplatform.v11google/cloud/aiplatform/v1/accelerator_type.proto"
MachineSpec
machine_type ( BAJ
@@ -40,7 +41,10 @@ public static function initOnce() {
replica_hours (BA"=
DiskSpec
boot_disk_type (
-boot_disk_size_gb ("L
+boot_disk_size_gb ("=
+PersistentDiskSpec
+ disk_type (
+disk_size_gb ("L
NfsMount
server ( BA
path ( BA
diff --git a/AiPlatform/metadata/V1/ModelMonitoring.php b/AiPlatform/metadata/V1/ModelMonitoring.php
index 43f211d8a999..ad96792e444f 100644
Binary files a/AiPlatform/metadata/V1/ModelMonitoring.php and b/AiPlatform/metadata/V1/ModelMonitoring.php differ
diff --git a/AiPlatform/samples/V1/DatasetServiceClient/create_dataset_version.php b/AiPlatform/samples/V1/DatasetServiceClient/create_dataset_version.php
new file mode 100644
index 000000000000..cded506064ac
--- /dev/null
+++ b/AiPlatform/samples/V1/DatasetServiceClient/create_dataset_version.php
@@ -0,0 +1,87 @@
+setParent($formattedParent)
+ ->setDatasetVersion($datasetVersion);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $datasetServiceClient->createDatasetVersion($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var DatasetVersion $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 = DatasetServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+
+ create_dataset_version_sample($formattedParent);
+}
+// [END aiplatform_v1_generated_DatasetService_CreateDatasetVersion_sync]
diff --git a/AiPlatform/samples/V1/DatasetServiceClient/delete_dataset_version.php b/AiPlatform/samples/V1/DatasetServiceClient/delete_dataset_version.php
new file mode 100644
index 000000000000..64cf118a22a4
--- /dev/null
+++ b/AiPlatform/samples/V1/DatasetServiceClient/delete_dataset_version.php
@@ -0,0 +1,87 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $datasetServiceClient->deleteDatasetVersion($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ printf('Operation completed successfully.' . PHP_EOL);
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = DatasetServiceClient::datasetVersionName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[DATASET]',
+ '[DATASET_VERSION]'
+ );
+
+ delete_dataset_version_sample($formattedName);
+}
+// [END aiplatform_v1_generated_DatasetService_DeleteDatasetVersion_sync]
diff --git a/AiPlatform/samples/V1/DatasetServiceClient/get_dataset_version.php b/AiPlatform/samples/V1/DatasetServiceClient/get_dataset_version.php
new file mode 100644
index 000000000000..f7d901ae07f1
--- /dev/null
+++ b/AiPlatform/samples/V1/DatasetServiceClient/get_dataset_version.php
@@ -0,0 +1,78 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var DatasetVersion $response */
+ $response = $datasetServiceClient->getDatasetVersion($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = DatasetServiceClient::datasetVersionName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[DATASET]',
+ '[DATASET_VERSION]'
+ );
+
+ get_dataset_version_sample($formattedName);
+}
+// [END aiplatform_v1_generated_DatasetService_GetDatasetVersion_sync]
diff --git a/AiPlatform/samples/V1/DatasetServiceClient/list_dataset_versions.php b/AiPlatform/samples/V1/DatasetServiceClient/list_dataset_versions.php
new file mode 100644
index 000000000000..f8e3c7f4c38b
--- /dev/null
+++ b/AiPlatform/samples/V1/DatasetServiceClient/list_dataset_versions.php
@@ -0,0 +1,78 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $datasetServiceClient->listDatasetVersions($request);
+
+ /** @var DatasetVersion $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 = DatasetServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+
+ list_dataset_versions_sample($formattedParent);
+}
+// [END aiplatform_v1_generated_DatasetService_ListDatasetVersions_sync]
diff --git a/AiPlatform/samples/V1/DatasetServiceClient/restore_dataset_version.php b/AiPlatform/samples/V1/DatasetServiceClient/restore_dataset_version.php
new file mode 100644
index 000000000000..f5b620dbda77
--- /dev/null
+++ b/AiPlatform/samples/V1/DatasetServiceClient/restore_dataset_version.php
@@ -0,0 +1,90 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $datasetServiceClient->restoreDatasetVersion($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var DatasetVersion $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = DatasetServiceClient::datasetVersionName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[DATASET]',
+ '[DATASET_VERSION]'
+ );
+
+ restore_dataset_version_sample($formattedName);
+}
+// [END aiplatform_v1_generated_DatasetService_RestoreDatasetVersion_sync]
diff --git a/AiPlatform/samples/V1/TensorboardServiceClient/batch_create_tensorboard_runs.php b/AiPlatform/samples/V1/TensorboardServiceClient/batch_create_tensorboard_runs.php
index ae0c13139969..5df38ca6af76 100644
--- a/AiPlatform/samples/V1/TensorboardServiceClient/batch_create_tensorboard_runs.php
+++ b/AiPlatform/samples/V1/TensorboardServiceClient/batch_create_tensorboard_runs.php
@@ -50,7 +50,7 @@
* component of the Tensorboard run's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*/
function batch_create_tensorboard_runs_sample(
string $formattedParent,
diff --git a/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_experiment.php b/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_experiment.php
index 11a157b7e5a2..e8de6cd3f616 100644
--- a/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_experiment.php
+++ b/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_experiment.php
@@ -39,7 +39,7 @@
* final component of the Tensorboard experiment's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*/
function create_tensorboard_experiment_sample(
string $formattedParent,
diff --git a/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_run.php b/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_run.php
index 0a04ff38308c..bcbc7322810f 100644
--- a/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_run.php
+++ b/AiPlatform/samples/V1/TensorboardServiceClient/create_tensorboard_run.php
@@ -42,7 +42,7 @@
* component of the Tensorboard run's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*/
function create_tensorboard_run_sample(
string $formattedParent,
diff --git a/AiPlatform/src/V1/Client/BaseClient/DatasetServiceBaseClient.php b/AiPlatform/src/V1/Client/BaseClient/DatasetServiceBaseClient.php
index 708cfc9c46b7..c83c97590e4f 100644
--- a/AiPlatform/src/V1/Client/BaseClient/DatasetServiceBaseClient.php
+++ b/AiPlatform/src/V1/Client/BaseClient/DatasetServiceBaseClient.php
@@ -37,17 +37,23 @@
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\AIPlatform\V1\AnnotationSpec;
use Google\Cloud\AIPlatform\V1\CreateDatasetRequest;
+use Google\Cloud\AIPlatform\V1\CreateDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\Dataset;
+use Google\Cloud\AIPlatform\V1\DatasetVersion;
use Google\Cloud\AIPlatform\V1\DeleteDatasetRequest;
+use Google\Cloud\AIPlatform\V1\DeleteDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\DeleteSavedQueryRequest;
use Google\Cloud\AIPlatform\V1\ExportDataRequest;
use Google\Cloud\AIPlatform\V1\GetAnnotationSpecRequest;
use Google\Cloud\AIPlatform\V1\GetDatasetRequest;
+use Google\Cloud\AIPlatform\V1\GetDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\ImportDataRequest;
use Google\Cloud\AIPlatform\V1\ListAnnotationsRequest;
use Google\Cloud\AIPlatform\V1\ListDataItemsRequest;
+use Google\Cloud\AIPlatform\V1\ListDatasetVersionsRequest;
use Google\Cloud\AIPlatform\V1\ListDatasetsRequest;
use Google\Cloud\AIPlatform\V1\ListSavedQueriesRequest;
+use Google\Cloud\AIPlatform\V1\RestoreDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\SearchDataItemsRequest;
use Google\Cloud\AIPlatform\V1\UpdateDatasetRequest;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
@@ -80,16 +86,21 @@
* @internal
*
* @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createDatasetVersionAsync(CreateDatasetVersionRequest $request, array $optionalArgs = [])
* @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteDatasetVersionAsync(DeleteDatasetVersionRequest $request, array $optionalArgs = [])
* @method PromiseInterface deleteSavedQueryAsync(DeleteSavedQueryRequest $request, array $optionalArgs = [])
* @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = [])
* @method PromiseInterface getAnnotationSpecAsync(GetAnnotationSpecRequest $request, array $optionalArgs = [])
* @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getDatasetVersionAsync(GetDatasetVersionRequest $request, array $optionalArgs = [])
* @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = [])
* @method PromiseInterface listAnnotationsAsync(ListAnnotationsRequest $request, array $optionalArgs = [])
* @method PromiseInterface listDataItemsAsync(ListDataItemsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listDatasetVersionsAsync(ListDatasetVersionsRequest $request, array $optionalArgs = [])
* @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = [])
* @method PromiseInterface listSavedQueriesAsync(ListSavedQueriesRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface restoreDatasetVersionAsync(RestoreDatasetVersionRequest $request, array $optionalArgs = [])
* @method PromiseInterface searchDataItemsAsync(SearchDataItemsRequest $request, array $optionalArgs = [])
* @method PromiseInterface updateDatasetAsync(UpdateDatasetRequest $request, array $optionalArgs = [])
* @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = [])
@@ -231,6 +242,27 @@ public static function datasetName(string $project, string $location, string $da
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * dataset_version resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $dataset
+ * @param string $datasetVersion
+ *
+ * @return string The formatted dataset_version resource.
+ */
+ public static function datasetVersionName(string $project, string $location, string $dataset, string $datasetVersion): string
+ {
+ return self::getPathTemplate('datasetVersion')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'dataset' => $dataset,
+ 'dataset_version' => $datasetVersion,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a location
* resource.
@@ -276,6 +308,7 @@ public static function savedQueryName(string $project, string $location, string
* - annotationSpec: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
* - dataItem: projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}
* - dataset: projects/{project}/locations/{location}/datasets/{dataset}
+ * - datasetVersion: projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}
* - location: projects/{project}/locations/{location}
* - savedQuery: projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}
*
@@ -395,6 +428,32 @@ public function createDataset(CreateDatasetRequest $request, array $callOptions
return $this->startApiCall('CreateDataset', $request, $callOptions)->wait();
}
+ /**
+ * Create a version from a Dataset.
+ *
+ * The async variant is {@see self::createDatasetVersionAsync()} .
+ *
+ * @example samples/V1/DatasetServiceClient/create_dataset_version.php
+ *
+ * @param CreateDatasetVersionRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createDatasetVersion(CreateDatasetVersionRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('CreateDatasetVersion', $request, $callOptions)->wait();
+ }
+
/**
* Deletes a Dataset.
*
@@ -421,6 +480,32 @@ public function deleteDataset(DeleteDatasetRequest $request, array $callOptions
return $this->startApiCall('DeleteDataset', $request, $callOptions)->wait();
}
+ /**
+ * Deletes a Dataset version.
+ *
+ * The async variant is {@see self::deleteDatasetVersionAsync()} .
+ *
+ * @example samples/V1/DatasetServiceClient/delete_dataset_version.php
+ *
+ * @param DeleteDatasetVersionRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteDatasetVersion(DeleteDatasetVersionRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeleteDatasetVersion', $request, $callOptions)->wait();
+ }
+
/**
* Deletes a SavedQuery.
*
@@ -525,6 +610,32 @@ public function getDataset(GetDatasetRequest $request, array $callOptions = []):
return $this->startApiCall('GetDataset', $request, $callOptions)->wait();
}
+ /**
+ * Gets a Dataset version.
+ *
+ * The async variant is {@see self::getDatasetVersionAsync()} .
+ *
+ * @example samples/V1/DatasetServiceClient/get_dataset_version.php
+ *
+ * @param GetDatasetVersionRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return DatasetVersion
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getDatasetVersion(GetDatasetVersionRequest $request, array $callOptions = []): DatasetVersion
+ {
+ return $this->startApiCall('GetDatasetVersion', $request, $callOptions)->wait();
+ }
+
/**
* Imports data into a Dataset.
*
@@ -603,6 +714,32 @@ public function listDataItems(ListDataItemsRequest $request, array $callOptions
return $this->startApiCall('ListDataItems', $request, $callOptions);
}
+ /**
+ * Lists DatasetVersions in a Dataset.
+ *
+ * The async variant is {@see self::listDatasetVersionsAsync()} .
+ *
+ * @example samples/V1/DatasetServiceClient/list_dataset_versions.php
+ *
+ * @param ListDatasetVersionsRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function listDatasetVersions(ListDatasetVersionsRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListDatasetVersions', $request, $callOptions);
+ }
+
/**
* Lists Datasets in a Location.
*
@@ -655,6 +792,32 @@ public function listSavedQueries(ListSavedQueriesRequest $request, array $callOp
return $this->startApiCall('ListSavedQueries', $request, $callOptions);
}
+ /**
+ * Restores a dataset version.
+ *
+ * The async variant is {@see self::restoreDatasetVersionAsync()} .
+ *
+ * @example samples/V1/DatasetServiceClient/restore_dataset_version.php
+ *
+ * @param RestoreDatasetVersionRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function restoreDatasetVersion(RestoreDatasetVersionRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('RestoreDatasetVersion', $request, $callOptions)->wait();
+ }
+
/**
* Searches DataItems in a Dataset.
*
diff --git a/AiPlatform/src/V1/Client/BaseClient/JobServiceBaseClient.php b/AiPlatform/src/V1/Client/BaseClient/JobServiceBaseClient.php
index f14156e51ce2..232b4127e41e 100644
--- a/AiPlatform/src/V1/Client/BaseClient/JobServiceBaseClient.php
+++ b/AiPlatform/src/V1/Client/BaseClient/JobServiceBaseClient.php
@@ -467,6 +467,23 @@ public static function networkName(string $project, string $network): string
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * notification_channel resource.
+ *
+ * @param string $project
+ * @param string $notificationChannel
+ *
+ * @return string The formatted notification_channel resource.
+ */
+ public static function notificationChannelName(string $project, string $notificationChannel): string
+ {
+ return self::getPathTemplate('notificationChannel')->render([
+ 'project' => $project,
+ 'notification_channel' => $notificationChannel,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a
* project_location_endpoint resource.
@@ -564,6 +581,7 @@ public static function trialName(string $project, string $location, string $stud
* - nasJob: projects/{project}/locations/{location}/nasJobs/{nas_job}
* - nasTrialDetail: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}
* - network: projects/{project}/global/networks/{network}
+ * - notificationChannel: projects/{project}/notificationChannels/{notification_channel}
* - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint}
* - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
* - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard}
diff --git a/AiPlatform/src/V1/CreateDatasetVersionRequest.php b/AiPlatform/src/V1/CreateDatasetVersionRequest.php
new file mode 100644
index 000000000000..a8cdb399abc5
--- /dev/null
+++ b/AiPlatform/src/V1/CreateDatasetVersionRequest.php
@@ -0,0 +1,148 @@
+google.cloud.aiplatform.v1.CreateDatasetVersionRequest
+ */
+class CreateDatasetVersionRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the Dataset resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ private $parent = '';
+ /**
+ * Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need
+ * to specify the EncryptionSpecType here.
+ *
+ * Generated from protobuf field .google.cloud.aiplatform.v1.DatasetVersion dataset_version = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $dataset_version = null;
+
+ /**
+ * @param string $parent Required. The name of the Dataset resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * Please see {@see DatasetServiceClient::datasetName()} for help formatting this field.
+ * @param \Google\Cloud\AIPlatform\V1\DatasetVersion $datasetVersion Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need
+ * to specify the EncryptionSpecType here.
+ *
+ * @return \Google\Cloud\AIPlatform\V1\CreateDatasetVersionRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\AIPlatform\V1\DatasetVersion $datasetVersion): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setDatasetVersion($datasetVersion);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The name of the Dataset resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @type \Google\Cloud\AIPlatform\V1\DatasetVersion $dataset_version
+ * Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need
+ * to specify the EncryptionSpecType here.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the Dataset resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ *
+ * 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 name of the Dataset resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ *
+ * 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 version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need
+ * to specify the EncryptionSpecType here.
+ *
+ * Generated from protobuf field .google.cloud.aiplatform.v1.DatasetVersion dataset_version = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\AIPlatform\V1\DatasetVersion|null
+ */
+ public function getDatasetVersion()
+ {
+ return $this->dataset_version;
+ }
+
+ public function hasDatasetVersion()
+ {
+ return isset($this->dataset_version);
+ }
+
+ public function clearDatasetVersion()
+ {
+ unset($this->dataset_version);
+ }
+
+ /**
+ * Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need
+ * to specify the EncryptionSpecType here.
+ *
+ * Generated from protobuf field .google.cloud.aiplatform.v1.DatasetVersion dataset_version = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\AIPlatform\V1\DatasetVersion $var
+ * @return $this
+ */
+ public function setDatasetVersion($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DatasetVersion::class);
+ $this->dataset_version = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/AiPlatform/src/V1/CreatePipelineJobRequest.php b/AiPlatform/src/V1/CreatePipelineJobRequest.php
index afe5081dbec3..a200921e44d6 100644
--- a/AiPlatform/src/V1/CreatePipelineJobRequest.php
+++ b/AiPlatform/src/V1/CreatePipelineJobRequest.php
@@ -34,7 +34,7 @@ class CreatePipelineJobRequest extends \Google\Protobuf\Internal\Message
* the PipelineJob name. If not provided, an ID will be automatically
* generated.
* This value should be less than 128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string pipeline_job_id = 3;
*/
@@ -50,7 +50,7 @@ class CreatePipelineJobRequest extends \Google\Protobuf\Internal\Message
* generated.
*
* This value should be less than 128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* @return \Google\Cloud\AIPlatform\V1\CreatePipelineJobRequest
*
@@ -80,7 +80,7 @@ public static function build(string $parent, \Google\Cloud\AIPlatform\V1\Pipelin
* the PipelineJob name. If not provided, an ID will be automatically
* generated.
* This value should be less than 128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
* }
*/
public function __construct($data = NULL) {
@@ -157,7 +157,7 @@ public function setPipelineJob($var)
* the PipelineJob name. If not provided, an ID will be automatically
* generated.
* This value should be less than 128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string pipeline_job_id = 3;
* @return string
@@ -172,7 +172,7 @@ public function getPipelineJobId()
* the PipelineJob name. If not provided, an ID will be automatically
* generated.
* This value should be less than 128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string pipeline_job_id = 3;
* @param string $var
diff --git a/AiPlatform/src/V1/CreateTensorboardExperimentRequest.php b/AiPlatform/src/V1/CreateTensorboardExperimentRequest.php
index e97c246ce2ac..8ffe522a768b 100644
--- a/AiPlatform/src/V1/CreateTensorboardExperimentRequest.php
+++ b/AiPlatform/src/V1/CreateTensorboardExperimentRequest.php
@@ -34,7 +34,7 @@ class CreateTensorboardExperimentRequest extends \Google\Protobuf\Internal\Messa
* Required. The ID to use for the Tensorboard experiment, which becomes the
* final component of the Tensorboard experiment's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string tensorboard_experiment_id = 3 [(.google.api.field_behavior) = REQUIRED];
*/
@@ -50,7 +50,7 @@ class CreateTensorboardExperimentRequest extends \Google\Protobuf\Internal\Messa
* final component of the Tensorboard experiment's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* @return \Google\Cloud\AIPlatform\V1\CreateTensorboardExperimentRequest
*
@@ -80,7 +80,7 @@ public static function build(string $parent, \Google\Cloud\AIPlatform\V1\Tensorb
* Required. The ID to use for the Tensorboard experiment, which becomes the
* final component of the Tensorboard experiment's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
* }
*/
public function __construct($data = NULL) {
@@ -158,7 +158,7 @@ public function setTensorboardExperiment($var)
* Required. The ID to use for the Tensorboard experiment, which becomes the
* final component of the Tensorboard experiment's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string tensorboard_experiment_id = 3 [(.google.api.field_behavior) = REQUIRED];
* @return string
@@ -172,7 +172,7 @@ public function getTensorboardExperimentId()
* Required. The ID to use for the Tensorboard experiment, which becomes the
* final component of the Tensorboard experiment's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string tensorboard_experiment_id = 3 [(.google.api.field_behavior) = REQUIRED];
* @param string $var
diff --git a/AiPlatform/src/V1/CreateTensorboardRunRequest.php b/AiPlatform/src/V1/CreateTensorboardRunRequest.php
index 35faeb207748..f8e8e906fed0 100644
--- a/AiPlatform/src/V1/CreateTensorboardRunRequest.php
+++ b/AiPlatform/src/V1/CreateTensorboardRunRequest.php
@@ -34,7 +34,7 @@ class CreateTensorboardRunRequest extends \Google\Protobuf\Internal\Message
* Required. The ID to use for the Tensorboard run, which becomes the final
* component of the Tensorboard run's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string tensorboard_run_id = 3 [(.google.api.field_behavior) = REQUIRED];
*/
@@ -50,7 +50,7 @@ class CreateTensorboardRunRequest extends \Google\Protobuf\Internal\Message
* component of the Tensorboard run's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* @return \Google\Cloud\AIPlatform\V1\CreateTensorboardRunRequest
*
@@ -80,7 +80,7 @@ public static function build(string $parent, \Google\Cloud\AIPlatform\V1\Tensorb
* Required. The ID to use for the Tensorboard run, which becomes the final
* component of the Tensorboard run's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
* }
*/
public function __construct($data = NULL) {
@@ -158,7 +158,7 @@ public function setTensorboardRun($var)
* Required. The ID to use for the Tensorboard run, which becomes the final
* component of the Tensorboard run's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string tensorboard_run_id = 3 [(.google.api.field_behavior) = REQUIRED];
* @return string
@@ -172,7 +172,7 @@ public function getTensorboardRunId()
* Required. The ID to use for the Tensorboard run, which becomes the final
* component of the Tensorboard run's resource name.
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
*
* Generated from protobuf field string tensorboard_run_id = 3 [(.google.api.field_behavior) = REQUIRED];
* @param string $var
diff --git a/AiPlatform/src/V1/DatasetVersion.php b/AiPlatform/src/V1/DatasetVersion.php
new file mode 100644
index 000000000000..d44ace0c8532
--- /dev/null
+++ b/AiPlatform/src/V1/DatasetVersion.php
@@ -0,0 +1,227 @@
+google.cloud.aiplatform.v1.DatasetVersion
+ */
+class DatasetVersion extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. The resource name of the DatasetVersion.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $name = '';
+ /**
+ * Output only. Timestamp when this DatasetVersion was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $create_time = null;
+ /**
+ * Output only. Timestamp when this DatasetVersion was last updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $update_time = null;
+ /**
+ * Used to perform consistent read-modify-write updates. If not set, a blind
+ * "overwrite" update happens.
+ *
+ * Generated from protobuf field string etag = 3;
+ */
+ private $etag = '';
+ /**
+ * Output only. Name of the associated BigQuery dataset.
+ *
+ * Generated from protobuf field string big_query_dataset_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $big_query_dataset_name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Output only. The resource name of the DatasetVersion.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. Timestamp when this DatasetVersion was created.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. Timestamp when this DatasetVersion was last updated.
+ * @type string $etag
+ * Used to perform consistent read-modify-write updates. If not set, a blind
+ * "overwrite" update happens.
+ * @type string $big_query_dataset_name
+ * Output only. Name of the associated BigQuery dataset.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetVersion::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. The resource name of the DatasetVersion.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Output only. The resource name of the DatasetVersion.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Timestamp when this DatasetVersion was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when this DatasetVersion was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when this DatasetVersion was last updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.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. Timestamp when this DatasetVersion was last updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.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;
+ }
+
+ /**
+ * Used to perform consistent read-modify-write updates. If not set, a blind
+ * "overwrite" update happens.
+ *
+ * Generated from protobuf field string etag = 3;
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Used to perform consistent read-modify-write updates. If not set, a blind
+ * "overwrite" update happens.
+ *
+ * Generated from protobuf field string etag = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Name of the associated BigQuery dataset.
+ *
+ * Generated from protobuf field string big_query_dataset_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getBigQueryDatasetName()
+ {
+ return $this->big_query_dataset_name;
+ }
+
+ /**
+ * Output only. Name of the associated BigQuery dataset.
+ *
+ * Generated from protobuf field string big_query_dataset_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setBigQueryDatasetName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->big_query_dataset_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/AiPlatform/src/V1/DeleteDatasetVersionRequest.php b/AiPlatform/src/V1/DeleteDatasetVersionRequest.php
new file mode 100644
index 000000000000..3e5c365e96a9
--- /dev/null
+++ b/AiPlatform/src/V1/DeleteDatasetVersionRequest.php
@@ -0,0 +1,92 @@
+google.cloud.aiplatform.v1.DeleteDatasetVersionRequest
+ */
+class DeleteDatasetVersionRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ private $name = '';
+
+ /**
+ * @param string $name Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * Please see {@see DatasetServiceClient::datasetVersionName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\AIPlatform\V1\DeleteDatasetVersionRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * 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 of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * 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/AiPlatform/src/V1/DeployedIndex.php b/AiPlatform/src/V1/DeployedIndex.php
index 7999a14bd328..592d05c46cca 100644
--- a/AiPlatform/src/V1/DeployedIndex.php
+++ b/AiPlatform/src/V1/DeployedIndex.php
@@ -128,7 +128,9 @@ class DeployedIndex extends \Google\Protobuf\Internal\Message
* network.
* The value should be the name of the address
* (https://cloud.google.com/compute/docs/reference/rest/v1/addresses)
- * Example: 'vertex-ai-ip-range'.
+ * Example: ['vertex-ai-ip-range'].
+ * For more information about subnets and network IP ranges, please see
+ * https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.
*
* Generated from protobuf field repeated string reserved_ip_ranges = 10 [(.google.api.field_behavior) = OPTIONAL];
*/
@@ -228,7 +230,9 @@ class DeployedIndex extends \Google\Protobuf\Internal\Message
* network.
* The value should be the name of the address
* (https://cloud.google.com/compute/docs/reference/rest/v1/addresses)
- * Example: 'vertex-ai-ip-range'.
+ * Example: ['vertex-ai-ip-range'].
+ * For more information about subnets and network IP ranges, please see
+ * https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.
* @type string $deployment_group
* Optional. The deployment group can be no longer than 64 characters (eg:
* 'test', 'prod'). If not set, we will use the 'default' deployment group.
@@ -665,7 +669,9 @@ public function setDeployedIndexAuthConfig($var)
* network.
* The value should be the name of the address
* (https://cloud.google.com/compute/docs/reference/rest/v1/addresses)
- * Example: 'vertex-ai-ip-range'.
+ * Example: ['vertex-ai-ip-range'].
+ * For more information about subnets and network IP ranges, please see
+ * https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.
*
* Generated from protobuf field repeated string reserved_ip_ranges = 10 [(.google.api.field_behavior) = OPTIONAL];
* @return \Google\Protobuf\Internal\RepeatedField
@@ -683,7 +689,9 @@ public function getReservedIpRanges()
* network.
* The value should be the name of the address
* (https://cloud.google.com/compute/docs/reference/rest/v1/addresses)
- * Example: 'vertex-ai-ip-range'.
+ * Example: ['vertex-ai-ip-range'].
+ * For more information about subnets and network IP ranges, please see
+ * https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.
*
* Generated from protobuf field repeated string reserved_ip_ranges = 10 [(.google.api.field_behavior) = OPTIONAL];
* @param array|\Google\Protobuf\Internal\RepeatedField $var
diff --git a/AiPlatform/src/V1/DeployedModel.php b/AiPlatform/src/V1/DeployedModel.php
index be829718be6b..fbb09fa94406 100644
--- a/AiPlatform/src/V1/DeployedModel.php
+++ b/AiPlatform/src/V1/DeployedModel.php
@@ -18,7 +18,7 @@ class DeployedModel extends \Google\Protobuf\Internal\Message
/**
* Immutable. The ID of the DeployedModel. If not provided upon deployment,
* Vertex AI will generate a value for this ID.
- * This value should be 1-10 characters, and valid characters are /[0-9]/.
+ * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
*
* Generated from protobuf field string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*/
@@ -137,7 +137,7 @@ class DeployedModel extends \Google\Protobuf\Internal\Message
* @type string $id
* Immutable. The ID of the DeployedModel. If not provided upon deployment,
* Vertex AI will generate a value for this ID.
- * This value should be 1-10 characters, and valid characters are /[0-9]/.
+ * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
* @type string $model
* Required. The resource name of the Model that this is the deployment of.
* Note that the Model may be in a different location than the DeployedModel's
@@ -275,7 +275,7 @@ public function setAutomaticResources($var)
/**
* Immutable. The ID of the DeployedModel. If not provided upon deployment,
* Vertex AI will generate a value for this ID.
- * This value should be 1-10 characters, and valid characters are /[0-9]/.
+ * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
*
* Generated from protobuf field string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
* @return string
@@ -288,7 +288,7 @@ public function getId()
/**
* Immutable. The ID of the DeployedModel. If not provided upon deployment,
* Vertex AI will generate a value for this ID.
- * This value should be 1-10 characters, and valid characters are /[0-9]/.
+ * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
*
* Generated from protobuf field string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
* @param string $var
diff --git a/AiPlatform/src/V1/Gapic/DatasetServiceGapicClient.php b/AiPlatform/src/V1/Gapic/DatasetServiceGapicClient.php
index 9742af8d8dfd..2bbf21c3e702 100644
--- a/AiPlatform/src/V1/Gapic/DatasetServiceGapicClient.php
+++ b/AiPlatform/src/V1/Gapic/DatasetServiceGapicClient.php
@@ -38,23 +38,30 @@
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\AIPlatform\V1\AnnotationSpec;
use Google\Cloud\AIPlatform\V1\CreateDatasetRequest;
+use Google\Cloud\AIPlatform\V1\CreateDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\Dataset;
+use Google\Cloud\AIPlatform\V1\DatasetVersion;
use Google\Cloud\AIPlatform\V1\DeleteDatasetRequest;
+use Google\Cloud\AIPlatform\V1\DeleteDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\DeleteSavedQueryRequest;
use Google\Cloud\AIPlatform\V1\ExportDataConfig;
use Google\Cloud\AIPlatform\V1\ExportDataRequest;
use Google\Cloud\AIPlatform\V1\GetAnnotationSpecRequest;
use Google\Cloud\AIPlatform\V1\GetDatasetRequest;
+use Google\Cloud\AIPlatform\V1\GetDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\ImportDataConfig;
use Google\Cloud\AIPlatform\V1\ImportDataRequest;
use Google\Cloud\AIPlatform\V1\ListAnnotationsRequest;
use Google\Cloud\AIPlatform\V1\ListAnnotationsResponse;
use Google\Cloud\AIPlatform\V1\ListDataItemsRequest;
use Google\Cloud\AIPlatform\V1\ListDataItemsResponse;
+use Google\Cloud\AIPlatform\V1\ListDatasetVersionsRequest;
+use Google\Cloud\AIPlatform\V1\ListDatasetVersionsResponse;
use Google\Cloud\AIPlatform\V1\ListDatasetsRequest;
use Google\Cloud\AIPlatform\V1\ListDatasetsResponse;
use Google\Cloud\AIPlatform\V1\ListSavedQueriesRequest;
use Google\Cloud\AIPlatform\V1\ListSavedQueriesResponse;
+use Google\Cloud\AIPlatform\V1\RestoreDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\SearchDataItemsRequest;
use Google\Cloud\AIPlatform\V1\SearchDataItemsRequest\OrderByAnnotation;
use Google\Cloud\AIPlatform\V1\SearchDataItemsResponse;
@@ -149,6 +156,8 @@ class DatasetServiceGapicClient
private static $datasetNameTemplate;
+ private static $datasetVersionNameTemplate;
+
private static $locationNameTemplate;
private static $savedQueryNameTemplate;
@@ -215,6 +224,17 @@ private static function getDatasetNameTemplate()
return self::$datasetNameTemplate;
}
+ private static function getDatasetVersionNameTemplate()
+ {
+ if (self::$datasetVersionNameTemplate == null) {
+ self::$datasetVersionNameTemplate = new PathTemplate(
+ 'projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}'
+ );
+ }
+
+ return self::$datasetVersionNameTemplate;
+ }
+
private static function getLocationNameTemplate()
{
if (self::$locationNameTemplate == null) {
@@ -244,6 +264,7 @@ private static function getPathTemplateMap()
'annotationSpec' => self::getAnnotationSpecNameTemplate(),
'dataItem' => self::getDataItemNameTemplate(),
'dataset' => self::getDatasetNameTemplate(),
+ 'datasetVersion' => self::getDatasetVersionNameTemplate(),
'location' => self::getLocationNameTemplate(),
'savedQuery' => self::getSavedQueryNameTemplate(),
];
@@ -321,6 +342,31 @@ public static function datasetName($project, $location, $dataset)
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * dataset_version resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $dataset
+ * @param string $datasetVersion
+ *
+ * @return string The formatted dataset_version resource.
+ */
+ public static function datasetVersionName(
+ $project,
+ $location,
+ $dataset,
+ $datasetVersion
+ ) {
+ return self::getDatasetVersionNameTemplate()->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'dataset' => $dataset,
+ 'dataset_version' => $datasetVersion,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a location
* resource.
@@ -370,6 +416,7 @@ public static function savedQueryName(
* - annotationSpec: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
* - dataItem: projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}
* - dataset: projects/{project}/locations/{location}/datasets/{dataset}
+ * - datasetVersion: projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}
* - location: projects/{project}/locations/{location}
* - savedQuery: projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}
*
@@ -585,6 +632,89 @@ public function createDataset($parent, $dataset, array $optionalArgs = [])
)->wait();
}
+ /**
+ * Create a version from a Dataset.
+ *
+ * Sample code:
+ * ```
+ * $datasetServiceClient = new DatasetServiceClient();
+ * try {
+ * $formattedParent = $datasetServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ * $datasetVersion = new DatasetVersion();
+ * $operationResponse = $datasetServiceClient->createDatasetVersion($formattedParent, $datasetVersion);
+ * $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 = $datasetServiceClient->createDatasetVersion($formattedParent, $datasetVersion);
+ * $operationName = $operationResponse->getName();
+ * // ... do other work
+ * $newOperationResponse = $datasetServiceClient->resumeOperation($operationName, 'createDatasetVersion');
+ * while (!$newOperationResponse->isDone()) {
+ * // ... do other work
+ * $newOperationResponse->reload();
+ * }
+ * if ($newOperationResponse->operationSucceeded()) {
+ * $result = $newOperationResponse->getResult();
+ * // doSomethingWith($result)
+ * } else {
+ * $error = $newOperationResponse->getError();
+ * // handleError($error)
+ * }
+ * } finally {
+ * $datasetServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $parent Required. The name of the Dataset resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @param DatasetVersion $datasetVersion Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need
+ * to specify the EncryptionSpecType here.
+ * @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\ApiCore\OperationResponse
+ *
+ * @throws ApiException if the remote call fails
+ */
+ public function createDatasetVersion(
+ $parent,
+ $datasetVersion,
+ array $optionalArgs = []
+ ) {
+ $request = new CreateDatasetVersionRequest();
+ $requestParamHeaders = [];
+ $request->setParent($parent);
+ $request->setDatasetVersion($datasetVersion);
+ $requestParamHeaders['parent'] = $parent;
+ $requestParams = new RequestParamsHeaderDescriptor(
+ $requestParamHeaders
+ );
+ $optionalArgs['headers'] = isset($optionalArgs['headers'])
+ ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
+ : $requestParams->getHeader();
+ return $this->startOperationsCall(
+ 'CreateDatasetVersion',
+ $optionalArgs,
+ $request,
+ $this->getOperationsClient()
+ )->wait();
+ }
+
/**
* Deletes a Dataset.
*
@@ -658,6 +788,79 @@ public function deleteDataset($name, array $optionalArgs = [])
)->wait();
}
+ /**
+ * Deletes a Dataset version.
+ *
+ * Sample code:
+ * ```
+ * $datasetServiceClient = new DatasetServiceClient();
+ * try {
+ * $formattedName = $datasetServiceClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ * $operationResponse = $datasetServiceClient->deleteDatasetVersion($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 = $datasetServiceClient->deleteDatasetVersion($formattedName);
+ * $operationName = $operationResponse->getName();
+ * // ... do other work
+ * $newOperationResponse = $datasetServiceClient->resumeOperation($operationName, 'deleteDatasetVersion');
+ * while (!$newOperationResponse->isDone()) {
+ * // ... do other work
+ * $newOperationResponse->reload();
+ * }
+ * if ($newOperationResponse->operationSucceeded()) {
+ * // operation succeeded and returns no value
+ * } else {
+ * $error = $newOperationResponse->getError();
+ * // handleError($error)
+ * }
+ * } finally {
+ * $datasetServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $name Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @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\ApiCore\OperationResponse
+ *
+ * @throws ApiException if the remote call fails
+ */
+ public function deleteDatasetVersion($name, array $optionalArgs = [])
+ {
+ $request = new DeleteDatasetVersionRequest();
+ $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->startOperationsCall(
+ 'DeleteDatasetVersion',
+ $optionalArgs,
+ $request,
+ $this->getOperationsClient()
+ )->wait();
+ }
+
/**
* Deletes a SavedQuery.
*
@@ -919,6 +1122,62 @@ public function getDataset($name, array $optionalArgs = [])
)->wait();
}
+ /**
+ * Gets a Dataset version.
+ *
+ * Sample code:
+ * ```
+ * $datasetServiceClient = new DatasetServiceClient();
+ * try {
+ * $formattedName = $datasetServiceClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ * $response = $datasetServiceClient->getDatasetVersion($formattedName);
+ * } finally {
+ * $datasetServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $name Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @param array $optionalArgs {
+ * Optional.
+ *
+ * @type FieldMask $readMask
+ * Mask specifying which fields to read.
+ * @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\AIPlatform\V1\DatasetVersion
+ *
+ * @throws ApiException if the remote call fails
+ */
+ public function getDatasetVersion($name, array $optionalArgs = [])
+ {
+ $request = new GetDatasetVersionRequest();
+ $requestParamHeaders = [];
+ $request->setName($name);
+ $requestParamHeaders['name'] = $name;
+ if (isset($optionalArgs['readMask'])) {
+ $request->setReadMask($optionalArgs['readMask']);
+ }
+
+ $requestParams = new RequestParamsHeaderDescriptor(
+ $requestParamHeaders
+ );
+ $optionalArgs['headers'] = isset($optionalArgs['headers'])
+ ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
+ : $requestParams->getHeader();
+ return $this->startCall(
+ 'GetDatasetVersion',
+ DatasetVersion::class,
+ $optionalArgs,
+ $request
+ )->wait();
+ }
+
/**
* Imports data into a Dataset.
*
@@ -1194,6 +1453,104 @@ public function listDataItems($parent, array $optionalArgs = [])
);
}
+ /**
+ * Lists DatasetVersions in a Dataset.
+ *
+ * Sample code:
+ * ```
+ * $datasetServiceClient = new DatasetServiceClient();
+ * try {
+ * $formattedParent = $datasetServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ * // Iterate over pages of elements
+ * $pagedResponse = $datasetServiceClient->listDatasetVersions($formattedParent);
+ * foreach ($pagedResponse->iteratePages() as $page) {
+ * foreach ($page as $element) {
+ * // doSomethingWith($element);
+ * }
+ * }
+ * // Alternatively:
+ * // Iterate through all elements
+ * $pagedResponse = $datasetServiceClient->listDatasetVersions($formattedParent);
+ * foreach ($pagedResponse->iterateAllElements() as $element) {
+ * // doSomethingWith($element);
+ * }
+ * } finally {
+ * $datasetServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $parent Required. The resource name of the Dataset to list DatasetVersions from.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @param array $optionalArgs {
+ * Optional.
+ *
+ * @type string $filter
+ * Optional. The standard list filter.
+ * @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 FieldMask $readMask
+ * Optional. Mask specifying which fields to read.
+ * @type string $orderBy
+ * Optional. A comma-separated list of fields to order by, sorted in ascending
+ * order. Use "desc" after a field name for descending.
+ * @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 listDatasetVersions($parent, array $optionalArgs = [])
+ {
+ $request = new ListDatasetVersionsRequest();
+ $requestParamHeaders = [];
+ $request->setParent($parent);
+ $requestParamHeaders['parent'] = $parent;
+ if (isset($optionalArgs['filter'])) {
+ $request->setFilter($optionalArgs['filter']);
+ }
+
+ if (isset($optionalArgs['pageSize'])) {
+ $request->setPageSize($optionalArgs['pageSize']);
+ }
+
+ if (isset($optionalArgs['pageToken'])) {
+ $request->setPageToken($optionalArgs['pageToken']);
+ }
+
+ if (isset($optionalArgs['readMask'])) {
+ $request->setReadMask($optionalArgs['readMask']);
+ }
+
+ if (isset($optionalArgs['orderBy'])) {
+ $request->setOrderBy($optionalArgs['orderBy']);
+ }
+
+ $requestParams = new RequestParamsHeaderDescriptor(
+ $requestParamHeaders
+ );
+ $optionalArgs['headers'] = isset($optionalArgs['headers'])
+ ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
+ : $requestParams->getHeader();
+ return $this->getPagedListResponse(
+ 'ListDatasetVersions',
+ $optionalArgs,
+ ListDatasetVersionsResponse::class,
+ $request
+ );
+ }
+
/**
* Lists Datasets in a Location.
*
@@ -1407,6 +1764,81 @@ public function listSavedQueries($parent, array $optionalArgs = [])
);
}
+ /**
+ * Restores a dataset version.
+ *
+ * Sample code:
+ * ```
+ * $datasetServiceClient = new DatasetServiceClient();
+ * try {
+ * $formattedName = $datasetServiceClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ * $operationResponse = $datasetServiceClient->restoreDatasetVersion($formattedName);
+ * $operationResponse->pollUntilComplete();
+ * if ($operationResponse->operationSucceeded()) {
+ * $result = $operationResponse->getResult();
+ * // doSomethingWith($result)
+ * } else {
+ * $error = $operationResponse->getError();
+ * // handleError($error)
+ * }
+ * // Alternatively:
+ * // start the operation, keep the operation name, and resume later
+ * $operationResponse = $datasetServiceClient->restoreDatasetVersion($formattedName);
+ * $operationName = $operationResponse->getName();
+ * // ... do other work
+ * $newOperationResponse = $datasetServiceClient->resumeOperation($operationName, 'restoreDatasetVersion');
+ * while (!$newOperationResponse->isDone()) {
+ * // ... do other work
+ * $newOperationResponse->reload();
+ * }
+ * if ($newOperationResponse->operationSucceeded()) {
+ * $result = $newOperationResponse->getResult();
+ * // doSomethingWith($result)
+ * } else {
+ * $error = $newOperationResponse->getError();
+ * // handleError($error)
+ * }
+ * } finally {
+ * $datasetServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $name Required. The name of the DatasetVersion resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @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\ApiCore\OperationResponse
+ *
+ * @throws ApiException if the remote call fails
+ */
+ public function restoreDatasetVersion($name, array $optionalArgs = [])
+ {
+ $request = new RestoreDatasetVersionRequest();
+ $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->startOperationsCall(
+ 'RestoreDatasetVersion',
+ $optionalArgs,
+ $request,
+ $this->getOperationsClient()
+ )->wait();
+ }
+
/**
* Searches DataItems in a Dataset.
*
diff --git a/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php b/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php
index e3a372032354..3b9b92c677f5 100644
--- a/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php
+++ b/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php
@@ -174,6 +174,8 @@ class JobServiceGapicClient
private static $networkNameTemplate;
+ private static $notificationChannelNameTemplate;
+
private static $projectLocationEndpointNameTemplate;
private static $projectLocationPublisherModelNameTemplate;
@@ -354,6 +356,17 @@ private static function getNetworkNameTemplate()
return self::$networkNameTemplate;
}
+ private static function getNotificationChannelNameTemplate()
+ {
+ if (self::$notificationChannelNameTemplate == null) {
+ self::$notificationChannelNameTemplate = new PathTemplate(
+ 'projects/{project}/notificationChannels/{notification_channel}'
+ );
+ }
+
+ return self::$notificationChannelNameTemplate;
+ }
+
private static function getProjectLocationEndpointNameTemplate()
{
if (self::$projectLocationEndpointNameTemplate == null) {
@@ -415,6 +428,7 @@ private static function getPathTemplateMap()
'nasJob' => self::getNasJobNameTemplate(),
'nasTrialDetail' => self::getNasTrialDetailNameTemplate(),
'network' => self::getNetworkNameTemplate(),
+ 'notificationChannel' => self::getNotificationChannelNameTemplate(),
'projectLocationEndpoint' => self::getProjectLocationEndpointNameTemplate(),
'projectLocationPublisherModel' => self::getProjectLocationPublisherModelNameTemplate(),
'tensorboard' => self::getTensorboardNameTemplate(),
@@ -692,6 +706,25 @@ public static function networkName($project, $network)
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * notification_channel resource.
+ *
+ * @param string $project
+ * @param string $notificationChannel
+ *
+ * @return string The formatted notification_channel resource.
+ */
+ public static function notificationChannelName(
+ $project,
+ $notificationChannel
+ ) {
+ return self::getNotificationChannelNameTemplate()->render([
+ 'project' => $project,
+ 'notification_channel' => $notificationChannel,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a
* project_location_endpoint resource.
@@ -796,6 +829,7 @@ public static function trialName($project, $location, $study, $trial)
* - nasJob: projects/{project}/locations/{location}/nasJobs/{nas_job}
* - nasTrialDetail: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}
* - network: projects/{project}/global/networks/{network}
+ * - notificationChannel: projects/{project}/notificationChannels/{notification_channel}
* - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint}
* - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
* - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard}
diff --git a/AiPlatform/src/V1/Gapic/PipelineServiceGapicClient.php b/AiPlatform/src/V1/Gapic/PipelineServiceGapicClient.php
index 4e90817f46c2..f138172089ae 100644
--- a/AiPlatform/src/V1/Gapic/PipelineServiceGapicClient.php
+++ b/AiPlatform/src/V1/Gapic/PipelineServiceGapicClient.php
@@ -911,7 +911,7 @@ public function cancelTrainingPipeline($name, array $optionalArgs = [])
* generated.
*
* This value should be less than 128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
* @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
diff --git a/AiPlatform/src/V1/Gapic/TensorboardServiceGapicClient.php b/AiPlatform/src/V1/Gapic/TensorboardServiceGapicClient.php
index b4f9b6c519d7..4bf8b2d16185 100644
--- a/AiPlatform/src/V1/Gapic/TensorboardServiceGapicClient.php
+++ b/AiPlatform/src/V1/Gapic/TensorboardServiceGapicClient.php
@@ -811,7 +811,7 @@ public function createTensorboard(
* final component of the Tensorboard experiment's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
* @param array $optionalArgs {
* Optional.
*
@@ -881,7 +881,7 @@ public function createTensorboardExperiment(
* component of the Tensorboard run's resource name.
*
* This value should be 1-128 characters, and valid characters
- * are /[a-z][0-9]-/.
+ * are `/[a-z][0-9]-/`.
* @param array $optionalArgs {
* Optional.
*
diff --git a/AiPlatform/src/V1/GetDatasetVersionRequest.php b/AiPlatform/src/V1/GetDatasetVersionRequest.php
new file mode 100644
index 000000000000..1a0682831fb8
--- /dev/null
+++ b/AiPlatform/src/V1/GetDatasetVersionRequest.php
@@ -0,0 +1,136 @@
+google.cloud.aiplatform.v1.GetDatasetVersionRequest
+ */
+class GetDatasetVersionRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ private $name = '';
+ /**
+ * Mask specifying which fields to read.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2;
+ */
+ private $read_mask = null;
+
+ /**
+ * @param string $name Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * Please see {@see DatasetServiceClient::datasetVersionName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\AIPlatform\V1\GetDatasetVersionRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @type \Google\Protobuf\FieldMask $read_mask
+ * Mask specifying which fields to read.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource name of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * 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 of the Dataset version to delete.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * 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;
+ }
+
+ /**
+ * Mask specifying which fields to read.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2;
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getReadMask()
+ {
+ return $this->read_mask;
+ }
+
+ public function hasReadMask()
+ {
+ return isset($this->read_mask);
+ }
+
+ public function clearReadMask()
+ {
+ unset($this->read_mask);
+ }
+
+ /**
+ * Mask specifying which fields to read.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2;
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setReadMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->read_mask = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/AiPlatform/src/V1/Index/IndexUpdateMethod.php b/AiPlatform/src/V1/Index/IndexUpdateMethod.php
index 86b751e727c8..f0f42043a2d1 100644
--- a/AiPlatform/src/V1/Index/IndexUpdateMethod.php
+++ b/AiPlatform/src/V1/Index/IndexUpdateMethod.php
@@ -21,7 +21,7 @@ class IndexUpdateMethod
const INDEX_UPDATE_METHOD_UNSPECIFIED = 0;
/**
* BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
- * datapoints to update.
+ * Datapoints to update.
*
* Generated from protobuf enum BATCH_UPDATE = 1;
*/
diff --git a/AiPlatform/src/V1/IndexDatapoint.php b/AiPlatform/src/V1/IndexDatapoint.php
index 0beb37dabdac..0068a76cdae9 100644
--- a/AiPlatform/src/V1/IndexDatapoint.php
+++ b/AiPlatform/src/V1/IndexDatapoint.php
@@ -31,7 +31,7 @@ class IndexDatapoint extends \Google\Protobuf\Internal\Message
/**
* Optional. List of Restrict of the datapoint, used to perform "restricted
* searches" where boolean rule are used to filter the subset of the database
- * eligible for matching. See:
+ * eligible for matching. This uses categorical tokens. See:
* https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
*
* Generated from protobuf field repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -59,7 +59,7 @@ class IndexDatapoint extends \Google\Protobuf\Internal\Message
* @type array<\Google\Cloud\AIPlatform\V1\IndexDatapoint\Restriction>|\Google\Protobuf\Internal\RepeatedField $restricts
* Optional. List of Restrict of the datapoint, used to perform "restricted
* searches" where boolean rule are used to filter the subset of the database
- * eligible for matching. See:
+ * eligible for matching. This uses categorical tokens. See:
* https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
* @type \Google\Cloud\AIPlatform\V1\IndexDatapoint\CrowdingTag $crowding_tag
* Optional. CrowdingTag of the datapoint, the number of neighbors to return
@@ -128,7 +128,7 @@ public function setFeatureVector($var)
/**
* Optional. List of Restrict of the datapoint, used to perform "restricted
* searches" where boolean rule are used to filter the subset of the database
- * eligible for matching. See:
+ * eligible for matching. This uses categorical tokens. See:
* https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
*
* Generated from protobuf field repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -142,7 +142,7 @@ public function getRestricts()
/**
* Optional. List of Restrict of the datapoint, used to perform "restricted
* searches" where boolean rule are used to filter the subset of the database
- * eligible for matching. See:
+ * eligible for matching. This uses categorical tokens. See:
* https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
*
* Generated from protobuf field repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL];
diff --git a/AiPlatform/src/V1/IndexDatapoint/Restriction.php b/AiPlatform/src/V1/IndexDatapoint/Restriction.php
index ca1fb203a0e9..72effa875d21 100644
--- a/AiPlatform/src/V1/IndexDatapoint/Restriction.php
+++ b/AiPlatform/src/V1/IndexDatapoint/Restriction.php
@@ -17,19 +17,19 @@
class Restriction extends \Google\Protobuf\Internal\Message
{
/**
- * The namespace of this restriction. eg: color.
+ * The namespace of this restriction. e.g.: color.
*
* Generated from protobuf field string namespace = 1;
*/
private $namespace = '';
/**
- * The attributes to allow in this namespace. eg: 'red'
+ * The attributes to allow in this namespace. e.g.: 'red'
*
* Generated from protobuf field repeated string allow_list = 2;
*/
private $allow_list;
/**
- * The attributes to deny in this namespace. eg: 'blue'
+ * The attributes to deny in this namespace. e.g.: 'blue'
*
* Generated from protobuf field repeated string deny_list = 3;
*/
@@ -42,11 +42,11 @@ class Restriction extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $namespace
- * The namespace of this restriction. eg: color.
+ * The namespace of this restriction. e.g.: color.
* @type array|\Google\Protobuf\Internal\RepeatedField $allow_list
- * The attributes to allow in this namespace. eg: 'red'
+ * The attributes to allow in this namespace. e.g.: 'red'
* @type array|\Google\Protobuf\Internal\RepeatedField $deny_list
- * The attributes to deny in this namespace. eg: 'blue'
+ * The attributes to deny in this namespace. e.g.: 'blue'
* }
*/
public function __construct($data = NULL) {
@@ -55,7 +55,7 @@ public function __construct($data = NULL) {
}
/**
- * The namespace of this restriction. eg: color.
+ * The namespace of this restriction. e.g.: color.
*
* Generated from protobuf field string namespace = 1;
* @return string
@@ -66,7 +66,7 @@ public function getNamespace()
}
/**
- * The namespace of this restriction. eg: color.
+ * The namespace of this restriction. e.g.: color.
*
* Generated from protobuf field string namespace = 1;
* @param string $var
@@ -81,7 +81,7 @@ public function setNamespace($var)
}
/**
- * The attributes to allow in this namespace. eg: 'red'
+ * The attributes to allow in this namespace. e.g.: 'red'
*
* Generated from protobuf field repeated string allow_list = 2;
* @return \Google\Protobuf\Internal\RepeatedField
@@ -92,7 +92,7 @@ public function getAllowList()
}
/**
- * The attributes to allow in this namespace. eg: 'red'
+ * The attributes to allow in this namespace. e.g.: 'red'
*
* Generated from protobuf field repeated string allow_list = 2;
* @param array|\Google\Protobuf\Internal\RepeatedField $var
@@ -107,7 +107,7 @@ public function setAllowList($var)
}
/**
- * The attributes to deny in this namespace. eg: 'blue'
+ * The attributes to deny in this namespace. e.g.: 'blue'
*
* Generated from protobuf field repeated string deny_list = 3;
* @return \Google\Protobuf\Internal\RepeatedField
@@ -118,7 +118,7 @@ public function getDenyList()
}
/**
- * The attributes to deny in this namespace. eg: 'blue'
+ * The attributes to deny in this namespace. e.g.: 'blue'
*
* Generated from protobuf field repeated string deny_list = 3;
* @param array|\Google\Protobuf\Internal\RepeatedField $var
diff --git a/AiPlatform/src/V1/ListDatasetVersionsRequest.php b/AiPlatform/src/V1/ListDatasetVersionsRequest.php
new file mode 100644
index 000000000000..57a7f519d8cd
--- /dev/null
+++ b/AiPlatform/src/V1/ListDatasetVersionsRequest.php
@@ -0,0 +1,276 @@
+google.cloud.aiplatform.v1.ListDatasetVersionsRequest
+ */
+class ListDatasetVersionsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource name of the Dataset to list DatasetVersions from.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ private $parent = '';
+ /**
+ * Optional. The standard list filter.
+ *
+ * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $filter = '';
+ /**
+ * Optional. The standard list page size.
+ *
+ * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $page_size = 0;
+ /**
+ * Optional. The standard list page token.
+ *
+ * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $page_token = '';
+ /**
+ * Optional. Mask specifying which fields to read.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $read_mask = null;
+ /**
+ * Optional. A comma-separated list of fields to order by, sorted in ascending
+ * order. Use "desc" after a field name for descending.
+ *
+ * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $order_by = '';
+
+ /**
+ * @param string $parent Required. The resource name of the Dataset to list DatasetVersions from.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * Please see {@see DatasetServiceClient::datasetName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\AIPlatform\V1\ListDatasetVersionsRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The resource name of the Dataset to list DatasetVersions from.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @type string $filter
+ * Optional. The standard list filter.
+ * @type int $page_size
+ * Optional. The standard list page size.
+ * @type string $page_token
+ * Optional. The standard list page token.
+ * @type \Google\Protobuf\FieldMask $read_mask
+ * Optional. Mask specifying which fields to read.
+ * @type string $order_by
+ * Optional. A comma-separated list of fields to order by, sorted in ascending
+ * order. Use "desc" after a field name for descending.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource name of the Dataset to list DatasetVersions from.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ *
+ * 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 resource name of the Dataset to list DatasetVersions from.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ *
+ * 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;
+ }
+
+ /**
+ * Optional. The standard list filter.
+ *
+ * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. The standard list filter.
+ *
+ * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The standard list page size.
+ *
+ * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Optional. The standard list page size.
+ *
+ * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The standard list page token.
+ *
+ * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. The standard list page token.
+ *
+ * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Mask specifying which fields to read.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getReadMask()
+ {
+ return $this->read_mask;
+ }
+
+ public function hasReadMask()
+ {
+ return isset($this->read_mask);
+ }
+
+ public function clearReadMask()
+ {
+ unset($this->read_mask);
+ }
+
+ /**
+ * Optional. Mask specifying which fields to read.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setReadMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->read_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A comma-separated list of fields to order by, sorted in ascending
+ * order. Use "desc" after a field name for descending.
+ *
+ * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. A comma-separated list of fields to order by, sorted in ascending
+ * order. Use "desc" after a field name for descending.
+ *
+ * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/AiPlatform/src/V1/ListDatasetVersionsResponse.php b/AiPlatform/src/V1/ListDatasetVersionsResponse.php
new file mode 100644
index 000000000000..86eadf42f22c
--- /dev/null
+++ b/AiPlatform/src/V1/ListDatasetVersionsResponse.php
@@ -0,0 +1,102 @@
+google.cloud.aiplatform.v1.ListDatasetVersionsResponse
+ */
+class ListDatasetVersionsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of DatasetVersions that matches the specified filter in the request.
+ *
+ * Generated from protobuf field repeated .google.cloud.aiplatform.v1.DatasetVersion dataset_versions = 1;
+ */
+ private $dataset_versions;
+ /**
+ * The standard List next-page token.
+ *
+ * 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\AIPlatform\V1\DatasetVersion>|\Google\Protobuf\Internal\RepeatedField $dataset_versions
+ * A list of DatasetVersions that matches the specified filter in the request.
+ * @type string $next_page_token
+ * The standard List next-page token.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of DatasetVersions that matches the specified filter in the request.
+ *
+ * Generated from protobuf field repeated .google.cloud.aiplatform.v1.DatasetVersion dataset_versions = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDatasetVersions()
+ {
+ return $this->dataset_versions;
+ }
+
+ /**
+ * A list of DatasetVersions that matches the specified filter in the request.
+ *
+ * Generated from protobuf field repeated .google.cloud.aiplatform.v1.DatasetVersion dataset_versions = 1;
+ * @param array<\Google\Cloud\AIPlatform\V1\DatasetVersion>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDatasetVersions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\DatasetVersion::class);
+ $this->dataset_versions = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The standard List next-page token.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * The standard List next-page token.
+ *
+ * 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/AiPlatform/src/V1/ModelMonitoringAlertConfig.php b/AiPlatform/src/V1/ModelMonitoringAlertConfig.php
index 5584339113aa..6570cd8c26bc 100644
--- a/AiPlatform/src/V1/ModelMonitoringAlertConfig.php
+++ b/AiPlatform/src/V1/ModelMonitoringAlertConfig.php
@@ -23,6 +23,14 @@ class ModelMonitoringAlertConfig extends \Google\Protobuf\Internal\Message
* Generated from protobuf field bool enable_logging = 2;
*/
private $enable_logging = false;
+ /**
+ * Resource names of the NotificationChannels to send alert.
+ * Must be of the format
+ * `projects//notificationChannels/`
+ *
+ * Generated from protobuf field repeated string notification_channels = 3 [(.google.api.resource_reference) = {
+ */
+ private $notification_channels;
protected $alert;
/**
@@ -39,6 +47,10 @@ class ModelMonitoringAlertConfig extends \Google\Protobuf\Internal\Message
* [google.cloud.aiplatform.logging.ModelMonitoringAnomaliesLogEntry][].
* This can be further sinked to Pub/Sub or any other services supported
* by Cloud Logging.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $notification_channels
+ * Resource names of the NotificationChannels to send alert.
+ * Must be of the format
+ * `projects//notificationChannels/`
* }
*/
public function __construct($data = NULL) {
@@ -111,6 +123,36 @@ public function setEnableLogging($var)
return $this;
}
+ /**
+ * Resource names of the NotificationChannels to send alert.
+ * Must be of the format
+ * `projects//notificationChannels/`
+ *
+ * Generated from protobuf field repeated string notification_channels = 3 [(.google.api.resource_reference) = {
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNotificationChannels()
+ {
+ return $this->notification_channels;
+ }
+
+ /**
+ * Resource names of the NotificationChannels to send alert.
+ * Must be of the format
+ * `projects//notificationChannels/`
+ *
+ * Generated from protobuf field repeated string notification_channels = 3 [(.google.api.resource_reference) = {
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setNotificationChannels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->notification_channels = $arr;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/AiPlatform/src/V1/PersistentDiskSpec.php b/AiPlatform/src/V1/PersistentDiskSpec.php
new file mode 100644
index 000000000000..0487c4cfeaae
--- /dev/null
+++ b/AiPlatform/src/V1/PersistentDiskSpec.php
@@ -0,0 +1,118 @@
+google.cloud.aiplatform.v1.PersistentDiskSpec
+ */
+class PersistentDiskSpec extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Type of the disk (default is "pd-standard").
+ * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
+ * "pd-standard" (Persistent Disk Hard Disk Drive)
+ * "pd-balanced" (Balanced Persistent Disk)
+ * "pd-extreme" (Extreme Persistent Disk)
+ *
+ * Generated from protobuf field string disk_type = 1;
+ */
+ private $disk_type = '';
+ /**
+ * Size in GB of the disk (default is 100GB).
+ *
+ * Generated from protobuf field int64 disk_size_gb = 2;
+ */
+ private $disk_size_gb = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $disk_type
+ * Type of the disk (default is "pd-standard").
+ * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
+ * "pd-standard" (Persistent Disk Hard Disk Drive)
+ * "pd-balanced" (Balanced Persistent Disk)
+ * "pd-extreme" (Extreme Persistent Disk)
+ * @type int|string $disk_size_gb
+ * Size in GB of the disk (default is 100GB).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\MachineResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Type of the disk (default is "pd-standard").
+ * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
+ * "pd-standard" (Persistent Disk Hard Disk Drive)
+ * "pd-balanced" (Balanced Persistent Disk)
+ * "pd-extreme" (Extreme Persistent Disk)
+ *
+ * Generated from protobuf field string disk_type = 1;
+ * @return string
+ */
+ public function getDiskType()
+ {
+ return $this->disk_type;
+ }
+
+ /**
+ * Type of the disk (default is "pd-standard").
+ * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
+ * "pd-standard" (Persistent Disk Hard Disk Drive)
+ * "pd-balanced" (Balanced Persistent Disk)
+ * "pd-extreme" (Extreme Persistent Disk)
+ *
+ * Generated from protobuf field string disk_type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setDiskType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->disk_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Size in GB of the disk (default is 100GB).
+ *
+ * Generated from protobuf field int64 disk_size_gb = 2;
+ * @return int|string
+ */
+ public function getDiskSizeGb()
+ {
+ return $this->disk_size_gb;
+ }
+
+ /**
+ * Size in GB of the disk (default is 100GB).
+ *
+ * Generated from protobuf field int64 disk_size_gb = 2;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setDiskSizeGb($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->disk_size_gb = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/AiPlatform/src/V1/PipelineJob.php b/AiPlatform/src/V1/PipelineJob.php
index 80bc38193d1f..5ac537601c05 100644
--- a/AiPlatform/src/V1/PipelineJob.php
+++ b/AiPlatform/src/V1/PipelineJob.php
@@ -147,7 +147,9 @@ class PipelineJob extends \Google\Protobuf\Internal\Message
/**
* A template uri from where the
* [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec],
- * if empty, will be downloaded.
+ * if empty, will be downloaded. Currently, only uri from Vertex Template
+ * Registry & Gallery is supported. Reference to
+ * https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template.
*
* Generated from protobuf field string template_uri = 19;
*/
@@ -242,7 +244,9 @@ class PipelineJob extends \Google\Protobuf\Internal\Message
* @type string $template_uri
* A template uri from where the
* [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec],
- * if empty, will be downloaded.
+ * if empty, will be downloaded. Currently, only uri from Vertex Template
+ * Registry & Gallery is supported. Reference to
+ * https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template.
* @type \Google\Cloud\AIPlatform\V1\PipelineTemplateMetadata $template_metadata
* Output only. Pipeline template metadata. Will fill up fields if
* [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri]
@@ -832,7 +836,9 @@ public function setReservedIpRanges($var)
/**
* A template uri from where the
* [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec],
- * if empty, will be downloaded.
+ * if empty, will be downloaded. Currently, only uri from Vertex Template
+ * Registry & Gallery is supported. Reference to
+ * https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template.
*
* Generated from protobuf field string template_uri = 19;
* @return string
@@ -845,7 +851,9 @@ public function getTemplateUri()
/**
* A template uri from where the
* [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec],
- * if empty, will be downloaded.
+ * if empty, will be downloaded. Currently, only uri from Vertex Template
+ * Registry & Gallery is supported. Reference to
+ * https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template.
*
* Generated from protobuf field string template_uri = 19;
* @param string $var
diff --git a/AiPlatform/src/V1/RestoreDatasetVersionRequest.php b/AiPlatform/src/V1/RestoreDatasetVersionRequest.php
new file mode 100644
index 000000000000..9b2afc54d556
--- /dev/null
+++ b/AiPlatform/src/V1/RestoreDatasetVersionRequest.php
@@ -0,0 +1,92 @@
+google.cloud.aiplatform.v1.RestoreDatasetVersionRequest
+ */
+class RestoreDatasetVersionRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the DatasetVersion resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ private $name = '';
+
+ /**
+ * @param string $name Required. The name of the DatasetVersion resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * Please see {@see DatasetServiceClient::datasetVersionName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\AIPlatform\V1\RestoreDatasetVersionRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The name of the DatasetVersion resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Aiplatform\V1\DatasetService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the DatasetVersion resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * 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 DatasetVersion resource.
+ * Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ *
+ * 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/AiPlatform/src/V1/gapic_metadata.json b/AiPlatform/src/V1/gapic_metadata.json
index 872da2011603..8020268afa26 100644
--- a/AiPlatform/src/V1/gapic_metadata.json
+++ b/AiPlatform/src/V1/gapic_metadata.json
@@ -15,11 +15,21 @@
"createDataset"
]
},
+ "CreateDatasetVersion": {
+ "methods": [
+ "createDatasetVersion"
+ ]
+ },
"DeleteDataset": {
"methods": [
"deleteDataset"
]
},
+ "DeleteDatasetVersion": {
+ "methods": [
+ "deleteDatasetVersion"
+ ]
+ },
"DeleteSavedQuery": {
"methods": [
"deleteSavedQuery"
@@ -40,6 +50,11 @@
"getDataset"
]
},
+ "GetDatasetVersion": {
+ "methods": [
+ "getDatasetVersion"
+ ]
+ },
"ImportData": {
"methods": [
"importData"
@@ -55,6 +70,11 @@
"listDataItems"
]
},
+ "ListDatasetVersions": {
+ "methods": [
+ "listDatasetVersions"
+ ]
+ },
"ListDatasets": {
"methods": [
"listDatasets"
@@ -65,6 +85,11 @@
"listSavedQueries"
]
},
+ "RestoreDatasetVersion": {
+ "methods": [
+ "restoreDatasetVersion"
+ ]
+ },
"SearchDataItems": {
"methods": [
"searchDataItems"
diff --git a/AiPlatform/src/V1/resources/dataset_service_client_config.json b/AiPlatform/src/V1/resources/dataset_service_client_config.json
index 5d5fa64395ae..f2eef2cb9580 100644
--- a/AiPlatform/src/V1/resources/dataset_service_client_config.json
+++ b/AiPlatform/src/V1/resources/dataset_service_client_config.json
@@ -21,11 +21,21 @@
"retry_codes_name": "no_retry_codes",
"retry_params_name": "no_retry_params"
},
+ "CreateDatasetVersion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
"DeleteDataset": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_codes",
"retry_params_name": "no_retry_params"
},
+ "DeleteDatasetVersion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
"DeleteSavedQuery": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_codes",
@@ -46,6 +56,11 @@
"retry_codes_name": "no_retry_codes",
"retry_params_name": "no_retry_params"
},
+ "GetDatasetVersion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
"ImportData": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_codes",
@@ -61,6 +76,11 @@
"retry_codes_name": "no_retry_codes",
"retry_params_name": "no_retry_params"
},
+ "ListDatasetVersions": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
"ListDatasets": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_codes",
@@ -71,6 +91,11 @@
"retry_codes_name": "no_retry_codes",
"retry_params_name": "no_retry_params"
},
+ "RestoreDatasetVersion": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
"SearchDataItems": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_codes",
diff --git a/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php b/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php
index d46c67019e55..d3a2854f250b 100644
--- a/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php
+++ b/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php
@@ -22,6 +22,25 @@
],
],
],
+ 'CreateDatasetVersion' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\DatasetVersion',
+ 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\CreateDatasetVersionOperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'DeleteDataset' => [
'longRunning' => [
'operationReturnType' => '\Google\Protobuf\GPBEmpty',
@@ -41,6 +60,25 @@
],
],
],
+ 'DeleteDatasetVersion' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
+ 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteOperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'DeleteSavedQuery' => [
'longRunning' => [
'operationReturnType' => '\Google\Protobuf\GPBEmpty',
@@ -98,6 +136,25 @@
],
],
],
+ 'RestoreDatasetVersion' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\DatasetVersion',
+ 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\RestoreDatasetVersionOperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetAnnotationSpec' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\AIPlatform\V1\AnnotationSpec',
@@ -122,6 +179,18 @@
],
],
],
+ 'GetDatasetVersion' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\AIPlatform\V1\DatasetVersion',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'ListAnnotations' => [
'pageStreaming' => [
'requestPageTokenGetMethod' => 'getPageToken',
@@ -162,6 +231,26 @@
],
],
],
+ 'ListDatasetVersions' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getDatasetVersions',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\AIPlatform\V1\ListDatasetVersionsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'ListDatasets' => [
'pageStreaming' => [
'requestPageTokenGetMethod' => 'getPageToken',
@@ -312,6 +401,7 @@
'annotationSpec' => 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}',
'dataItem' => 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}',
'dataset' => 'projects/{project}/locations/{location}/datasets/{dataset}',
+ 'datasetVersion' => 'projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}',
'location' => 'projects/{project}/locations/{location}',
'savedQuery' => 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}',
],
diff --git a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php
index 67389139158b..38ea4623fb5e 100644
--- a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php
@@ -15,6 +15,18 @@
],
],
],
+ 'CreateDatasetVersion' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions',
+ 'body' => 'dataset_version',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'DeleteDataset' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}',
@@ -26,6 +38,17 @@
],
],
],
+ 'DeleteDatasetVersion' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'DeleteSavedQuery' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}',
@@ -71,6 +94,17 @@
],
],
],
+ 'GetDatasetVersion' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'ImportData' => [
'method' => 'post',
'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}:import',
@@ -105,6 +139,17 @@
],
],
],
+ 'ListDatasetVersions' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'ListDatasets' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/datasets',
@@ -127,6 +172,17 @@
],
],
],
+ 'RestoreDatasetVersion' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}:restore',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'SearchDataItems' => [
'method' => 'get',
'uriTemplate' => '/v1/{dataset=projects/*/locations/*/datasets/*}:searchDataItems',
@@ -200,6 +256,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -239,6 +299,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -281,6 +346,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php
index f3221b39582b..d7ea0a7d9425 100644
--- a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php
@@ -146,6 +146,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -185,6 +189,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -227,6 +236,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php
index 1ef752c25468..7b4914d95dee 100644
--- a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php
@@ -85,6 +85,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -124,6 +128,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -166,6 +175,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php
index 00d39e5b3e89..4c1caad95e72 100644
--- a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php
@@ -303,6 +303,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -342,6 +346,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -384,6 +393,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php
index bc547ff581c6..c87d8c950456 100644
--- a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php
@@ -146,6 +146,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -185,6 +189,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -227,6 +236,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/index_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_service_rest_client_config.php
index 11923f6690c5..e4f5ba8e4030 100644
--- a/AiPlatform/src/V1/resources/index_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/index_service_rest_client_config.php
@@ -131,6 +131,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -170,6 +174,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -212,6 +221,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/job_service_descriptor_config.php b/AiPlatform/src/V1/resources/job_service_descriptor_config.php
index 6fe00220ecb4..70bd84ce450b 100644
--- a/AiPlatform/src/V1/resources/job_service_descriptor_config.php
+++ b/AiPlatform/src/V1/resources/job_service_descriptor_config.php
@@ -624,6 +624,7 @@
'nasJob' => 'projects/{project}/locations/{location}/nasJobs/{nas_job}',
'nasTrialDetail' => 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}',
'network' => 'projects/{project}/global/networks/{network}',
+ 'notificationChannel' => 'projects/{project}/notificationChannels/{notification_channel}',
'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}',
'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}',
'tensorboard' => 'projects/{project}/locations/{location}/tensorboards/{tensorboard}',
diff --git a/AiPlatform/src/V1/resources/job_service_rest_client_config.php b/AiPlatform/src/V1/resources/job_service_rest_client_config.php
index 66e14217426e..32433ec713f6 100644
--- a/AiPlatform/src/V1/resources/job_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/job_service_rest_client_config.php
@@ -453,6 +453,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -492,6 +496,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -534,6 +543,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/match_service_rest_client_config.php b/AiPlatform/src/V1/resources/match_service_rest_client_config.php
index c4b8b0d4ce6c..826d4d9edd4e 100644
--- a/AiPlatform/src/V1/resources/match_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/match_service_rest_client_config.php
@@ -73,6 +73,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -112,6 +116,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -154,6 +163,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php
index e98856611ede..08282a70c520 100644
--- a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php
@@ -419,6 +419,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -458,6 +462,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -500,6 +509,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php
index d2ec0de71bf8..692a410b773b 100644
--- a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php
@@ -73,6 +73,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -112,6 +116,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -154,6 +163,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php
index c29d4164a9ae..668e00d7d3be 100644
--- a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php
@@ -60,6 +60,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -99,6 +103,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -141,6 +150,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/model_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_service_rest_client_config.php
index b8ab77779e83..36b6a80453f7 100644
--- a/AiPlatform/src/V1/resources/model_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/model_service_rest_client_config.php
@@ -260,6 +260,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -299,6 +303,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -341,6 +350,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php
index b46e255cb989..16bd34b90de0 100644
--- a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php
@@ -163,6 +163,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -202,6 +206,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -244,6 +253,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php
index 6b7e288a0406..3efd81af503d 100644
--- a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php
@@ -118,6 +118,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -157,6 +161,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -199,6 +208,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php
index 4efabf54dec8..7e062f1abdf8 100644
--- a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php
@@ -134,6 +134,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -173,6 +177,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -215,6 +224,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php
index 3cee9f87a82d..c1a5c0e54208 100644
--- a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php
@@ -110,6 +110,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -149,6 +153,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -191,6 +200,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php
index 486db4379a85..85296eb5c0ce 100644
--- a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php
@@ -414,6 +414,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -453,6 +457,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -495,6 +504,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php
index 2f197a14a9ef..b994ea053dad 100644
--- a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php
+++ b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php
@@ -223,6 +223,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy',
@@ -262,6 +266,11 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy',
+ 'body' => '*',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy',
@@ -304,6 +313,10 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions',
+ ],
[
'method' => 'post',
'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions',
diff --git a/AiPlatform/tests/Unit/V1/Client/DatasetServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/DatasetServiceClientTest.php
index e877450a5790..ae8c569884b2 100644
--- a/AiPlatform/tests/Unit/V1/Client/DatasetServiceClientTest.php
+++ b/AiPlatform/tests/Unit/V1/Client/DatasetServiceClientTest.php
@@ -31,26 +31,33 @@
use Google\Cloud\AIPlatform\V1\AnnotationSpec;
use Google\Cloud\AIPlatform\V1\Client\DatasetServiceClient;
use Google\Cloud\AIPlatform\V1\CreateDatasetRequest;
+use Google\Cloud\AIPlatform\V1\CreateDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\DataItem;
use Google\Cloud\AIPlatform\V1\DataItemView;
use Google\Cloud\AIPlatform\V1\Dataset;
+use Google\Cloud\AIPlatform\V1\DatasetVersion;
use Google\Cloud\AIPlatform\V1\DeleteDatasetRequest;
+use Google\Cloud\AIPlatform\V1\DeleteDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\DeleteSavedQueryRequest;
use Google\Cloud\AIPlatform\V1\ExportDataConfig;
use Google\Cloud\AIPlatform\V1\ExportDataRequest;
use Google\Cloud\AIPlatform\V1\ExportDataResponse;
use Google\Cloud\AIPlatform\V1\GetAnnotationSpecRequest;
use Google\Cloud\AIPlatform\V1\GetDatasetRequest;
+use Google\Cloud\AIPlatform\V1\GetDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\ImportDataRequest;
use Google\Cloud\AIPlatform\V1\ImportDataResponse;
use Google\Cloud\AIPlatform\V1\ListAnnotationsRequest;
use Google\Cloud\AIPlatform\V1\ListAnnotationsResponse;
use Google\Cloud\AIPlatform\V1\ListDataItemsRequest;
use Google\Cloud\AIPlatform\V1\ListDataItemsResponse;
+use Google\Cloud\AIPlatform\V1\ListDatasetVersionsRequest;
+use Google\Cloud\AIPlatform\V1\ListDatasetVersionsResponse;
use Google\Cloud\AIPlatform\V1\ListDatasetsRequest;
use Google\Cloud\AIPlatform\V1\ListDatasetsResponse;
use Google\Cloud\AIPlatform\V1\ListSavedQueriesRequest;
use Google\Cloud\AIPlatform\V1\ListSavedQueriesResponse;
+use Google\Cloud\AIPlatform\V1\RestoreDatasetVersionRequest;
use Google\Cloud\AIPlatform\V1\SavedQuery;
use Google\Cloud\AIPlatform\V1\SearchDataItemsRequest;
use Google\Cloud\AIPlatform\V1\SearchDataItemsResponse;
@@ -254,6 +261,139 @@ public function createDatasetExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
}
+ /** @test */
+ public function createDatasetVersionTest()
+ {
+ $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/createDatasetVersionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $etag = 'etag3123477';
+ $bigQueryDatasetName = 'bigQueryDatasetName-1230960216';
+ $expectedResponse = new DatasetVersion();
+ $expectedResponse->setName($name);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBigQueryDatasetName($bigQueryDatasetName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/createDatasetVersionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $datasetVersion = new DatasetVersion();
+ $request = (new CreateDatasetVersionRequest())
+ ->setParent($formattedParent)
+ ->setDatasetVersion($datasetVersion);
+ $response = $gapicClient->createDatasetVersion($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.aiplatform.v1.DatasetService/CreateDatasetVersion', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getDatasetVersion();
+ $this->assertProtobufEquals($datasetVersion, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createDatasetVersionTest');
+ $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 createDatasetVersionExceptionTest()
+ {
+ $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/createDatasetVersionTest');
+ $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $datasetVersion = new DatasetVersion();
+ $request = (new CreateDatasetVersionRequest())
+ ->setParent($formattedParent)
+ ->setDatasetVersion($datasetVersion);
+ $response = $gapicClient->createDatasetVersion($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createDatasetVersionTest');
+ 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 deleteDatasetTest()
{
@@ -375,6 +515,127 @@ public function deleteDatasetExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
}
+ /** @test */
+ public function deleteDatasetVersionTest()
+ {
+ $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/deleteDatasetVersionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new GPBEmpty();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteDatasetVersionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $request = (new DeleteDatasetVersionRequest())
+ ->setName($formattedName);
+ $response = $gapicClient->deleteDatasetVersion($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.aiplatform.v1.DatasetService/DeleteDatasetVersion', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteDatasetVersionTest');
+ $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 deleteDatasetVersionExceptionTest()
+ {
+ $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/deleteDatasetVersionTest');
+ $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->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $request = (new DeleteDatasetVersionRequest())
+ ->setName($formattedName);
+ $response = $gapicClient->deleteDatasetVersion($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteDatasetVersionTest');
+ 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 deleteSavedQueryTest()
{
@@ -767,6 +1028,74 @@ public function getDatasetExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function getDatasetVersionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $etag = 'etag3123477';
+ $bigQueryDatasetName = 'bigQueryDatasetName-1230960216';
+ $expectedResponse = new DatasetVersion();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBigQueryDatasetName($bigQueryDatasetName);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $request = (new GetDatasetVersionRequest())
+ ->setName($formattedName);
+ $response = $gapicClient->getDatasetVersion($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.aiplatform.v1.DatasetService/GetDatasetVersion', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getDatasetVersionExceptionTest()
+ {
+ $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->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $request = (new GetDatasetVersionRequest())
+ ->setName($formattedName);
+ try {
+ $gapicClient->getDatasetVersion($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function importDataTest()
{
@@ -1038,6 +1367,78 @@ public function listDataItemsExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function listDatasetVersionsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $datasetVersionsElement = new DatasetVersion();
+ $datasetVersions = [
+ $datasetVersionsElement,
+ ];
+ $expectedResponse = new ListDatasetVersionsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setDatasetVersions($datasetVersions);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $request = (new ListDatasetVersionsRequest())
+ ->setParent($formattedParent);
+ $response = $gapicClient->listDatasetVersions($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getDatasetVersions()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.aiplatform.v1.DatasetService/ListDatasetVersions', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listDatasetVersionsExceptionTest()
+ {
+ $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $request = (new ListDatasetVersionsRequest())
+ ->setParent($formattedParent);
+ try {
+ $gapicClient->listDatasetVersions($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function listDatasetsTest()
{
@@ -1182,6 +1583,133 @@ public function listSavedQueriesExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function restoreDatasetVersionTest()
+ {
+ $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/restoreDatasetVersionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $etag = 'etag3123477';
+ $bigQueryDatasetName = 'bigQueryDatasetName-1230960216';
+ $expectedResponse = new DatasetVersion();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBigQueryDatasetName($bigQueryDatasetName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/restoreDatasetVersionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $request = (new RestoreDatasetVersionRequest())
+ ->setName($formattedName);
+ $response = $gapicClient->restoreDatasetVersion($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.aiplatform.v1.DatasetService/RestoreDatasetVersion', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/restoreDatasetVersionTest');
+ $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 restoreDatasetVersionExceptionTest()
+ {
+ $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/restoreDatasetVersionTest');
+ $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->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $request = (new RestoreDatasetVersionRequest())
+ ->setName($formattedName);
+ $response = $gapicClient->restoreDatasetVersion($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/restoreDatasetVersionTest');
+ 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 searchDataItemsTest()
{
diff --git a/AiPlatform/tests/Unit/V1/DatasetServiceClientTest.php b/AiPlatform/tests/Unit/V1/DatasetServiceClientTest.php
index 36f862c03c44..1b165968f0b6 100644
--- a/AiPlatform/tests/Unit/V1/DatasetServiceClientTest.php
+++ b/AiPlatform/tests/Unit/V1/DatasetServiceClientTest.php
@@ -33,11 +33,13 @@
use Google\Cloud\AIPlatform\V1\DataItemView;
use Google\Cloud\AIPlatform\V1\Dataset;
use Google\Cloud\AIPlatform\V1\DatasetServiceClient;
+use Google\Cloud\AIPlatform\V1\DatasetVersion;
use Google\Cloud\AIPlatform\V1\ExportDataConfig;
use Google\Cloud\AIPlatform\V1\ExportDataResponse;
use Google\Cloud\AIPlatform\V1\ImportDataResponse;
use Google\Cloud\AIPlatform\V1\ListAnnotationsResponse;
use Google\Cloud\AIPlatform\V1\ListDataItemsResponse;
+use Google\Cloud\AIPlatform\V1\ListDatasetVersionsResponse;
use Google\Cloud\AIPlatform\V1\ListDatasetsResponse;
use Google\Cloud\AIPlatform\V1\ListSavedQueriesResponse;
use Google\Cloud\AIPlatform\V1\SavedQuery;
@@ -230,6 +232,133 @@ public function createDatasetExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
}
+ /** @test */
+ public function createDatasetVersionTest()
+ {
+ $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/createDatasetVersionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $etag = 'etag3123477';
+ $bigQueryDatasetName = 'bigQueryDatasetName-1230960216';
+ $expectedResponse = new DatasetVersion();
+ $expectedResponse->setName($name);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBigQueryDatasetName($bigQueryDatasetName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/createDatasetVersionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $datasetVersion = new DatasetVersion();
+ $response = $gapicClient->createDatasetVersion($formattedParent, $datasetVersion);
+ $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.aiplatform.v1.DatasetService/CreateDatasetVersion', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getDatasetVersion();
+ $this->assertProtobufEquals($datasetVersion, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createDatasetVersionTest');
+ $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 createDatasetVersionExceptionTest()
+ {
+ $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/createDatasetVersionTest');
+ $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $datasetVersion = new DatasetVersion();
+ $response = $gapicClient->createDatasetVersion($formattedParent, $datasetVersion);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createDatasetVersionTest');
+ 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 deleteDatasetTest()
{
@@ -347,6 +476,123 @@ public function deleteDatasetExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
}
+ /** @test */
+ public function deleteDatasetVersionTest()
+ {
+ $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/deleteDatasetVersionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new GPBEmpty();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteDatasetVersionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $response = $gapicClient->deleteDatasetVersion($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.aiplatform.v1.DatasetService/DeleteDatasetVersion', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteDatasetVersionTest');
+ $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 deleteDatasetVersionExceptionTest()
+ {
+ $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/deleteDatasetVersionTest');
+ $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->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $response = $gapicClient->deleteDatasetVersion($formattedName);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteDatasetVersionTest');
+ 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 deleteSavedQueryTest()
{
@@ -721,6 +967,70 @@ public function getDatasetExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function getDatasetVersionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $etag = 'etag3123477';
+ $bigQueryDatasetName = 'bigQueryDatasetName-1230960216';
+ $expectedResponse = new DatasetVersion();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBigQueryDatasetName($bigQueryDatasetName);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $response = $gapicClient->getDatasetVersion($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.aiplatform.v1.DatasetService/GetDatasetVersion', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getDatasetVersionExceptionTest()
+ {
+ $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->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ try {
+ $gapicClient->getDatasetVersion($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 importDataTest()
{
@@ -978,6 +1288,74 @@ public function listDataItemsExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function listDatasetVersionsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $datasetVersionsElement = new DatasetVersion();
+ $datasetVersions = [
+ $datasetVersionsElement,
+ ];
+ $expectedResponse = new ListDatasetVersionsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setDatasetVersions($datasetVersions);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ $response = $gapicClient->listDatasetVersions($formattedParent);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getDatasetVersions()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.aiplatform.v1.DatasetService/ListDatasetVersions', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listDatasetVersionsExceptionTest()
+ {
+ $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]');
+ try {
+ $gapicClient->listDatasetVersions($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 listDatasetsTest()
{
@@ -1114,6 +1492,129 @@ public function listSavedQueriesExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function restoreDatasetVersionTest()
+ {
+ $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/restoreDatasetVersionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $etag = 'etag3123477';
+ $bigQueryDatasetName = 'bigQueryDatasetName-1230960216';
+ $expectedResponse = new DatasetVersion();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBigQueryDatasetName($bigQueryDatasetName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/restoreDatasetVersionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $response = $gapicClient->restoreDatasetVersion($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.aiplatform.v1.DatasetService/RestoreDatasetVersion', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/restoreDatasetVersionTest');
+ $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 restoreDatasetVersionExceptionTest()
+ {
+ $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/restoreDatasetVersionTest');
+ $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->datasetVersionName('[PROJECT]', '[LOCATION]', '[DATASET]', '[DATASET_VERSION]');
+ $response = $gapicClient->restoreDatasetVersion($formattedName);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/restoreDatasetVersionTest');
+ 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 searchDataItemsTest()
{