diff --git a/AiPlatform/metadata/V1/AcceleratorType.php b/AiPlatform/metadata/V1/AcceleratorType.php index f0919508c6a4..b3da4e9a09ac 100644 Binary files a/AiPlatform/metadata/V1/AcceleratorType.php and b/AiPlatform/metadata/V1/AcceleratorType.php differ diff --git a/AiPlatform/metadata/V1/BatchPredictionJob.php b/AiPlatform/metadata/V1/BatchPredictionJob.php index c18bc1964e68..a1f62d64ba1f 100644 Binary files a/AiPlatform/metadata/V1/BatchPredictionJob.php and b/AiPlatform/metadata/V1/BatchPredictionJob.php differ diff --git a/AiPlatform/metadata/V1/Dataset.php b/AiPlatform/metadata/V1/Dataset.php index 2bc12bd64faf..95bfc4d4a2ab 100644 Binary files a/AiPlatform/metadata/V1/Dataset.php and b/AiPlatform/metadata/V1/Dataset.php differ diff --git a/AiPlatform/metadata/V1/DatasetService.php b/AiPlatform/metadata/V1/DatasetService.php index 140e1e69c534..8161f2b14f9f 100644 Binary files a/AiPlatform/metadata/V1/DatasetService.php and b/AiPlatform/metadata/V1/DatasetService.php differ diff --git a/AiPlatform/metadata/V1/EndpointService.php b/AiPlatform/metadata/V1/EndpointService.php index 673ea05d7396..fbaa1d631fc2 100644 --- a/AiPlatform/metadata/V1/EndpointService.php +++ b/AiPlatform/metadata/V1/EndpointService.php @@ -21,11 +21,12 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Aiplatform\V1\Endpoint::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\Operation::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -à -1google/cloud/aiplatform/v1/endpoint_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/cloud/aiplatform/v1/endpoint.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"© +à +1google/cloud/aiplatform/v1/endpoint_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/cloud/aiplatform/v1/endpoint.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"© CreateEndpointRequest9 parent ( B)àAúA# !locations.googleapis.com/Location; diff --git a/AiPlatform/metadata/V1/EvaluatedAnnotation.php b/AiPlatform/metadata/V1/EvaluatedAnnotation.php new file mode 100644 index 000000000000..305bf31cba77 Binary files /dev/null and b/AiPlatform/metadata/V1/EvaluatedAnnotation.php differ diff --git a/AiPlatform/metadata/V1/Featurestore.php b/AiPlatform/metadata/V1/Featurestore.php index 57b3cf5b2f44..12120e51be43 100644 Binary files a/AiPlatform/metadata/V1/Featurestore.php and b/AiPlatform/metadata/V1/Featurestore.php differ diff --git a/AiPlatform/metadata/V1/FeaturestoreService.php b/AiPlatform/metadata/V1/FeaturestoreService.php index 81d3231e307e..6b43cbf7815a 100644 Binary files a/AiPlatform/metadata/V1/FeaturestoreService.php and b/AiPlatform/metadata/V1/FeaturestoreService.php differ diff --git a/AiPlatform/metadata/V1/IndexEndpointService.php b/AiPlatform/metadata/V1/IndexEndpointService.php index 6cc07c30e777..b61bc528c156 100644 --- a/AiPlatform/metadata/V1/IndexEndpointService.php +++ b/AiPlatform/metadata/V1/IndexEndpointService.php @@ -21,11 +21,12 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Aiplatform\V1\IndexEndpoint::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\Operation::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -Þ$ -7google/cloud/aiplatform/v1/index_endpoint_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto/google/cloud/aiplatform/v1/index_endpoint.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"Ÿ +û$ +7google/cloud/aiplatform/v1/index_endpoint_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto/google/cloud/aiplatform/v1/index_endpoint.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Ÿ CreateIndexEndpointRequest9 parent ( B)àAúA# !locations.googleapis.com/LocationF diff --git a/AiPlatform/metadata/V1/IndexService.php b/AiPlatform/metadata/V1/IndexService.php index 277c4313fcec..8b77ddebbb7e 100644 Binary files a/AiPlatform/metadata/V1/IndexService.php and b/AiPlatform/metadata/V1/IndexService.php differ diff --git a/AiPlatform/metadata/V1/MetadataService.php b/AiPlatform/metadata/V1/MetadataService.php index 5e2de56bf0d0..419ff0f1ee02 100644 --- a/AiPlatform/metadata/V1/MetadataService.php +++ b/AiPlatform/metadata/V1/MetadataService.php @@ -27,11 +27,12 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Aiplatform\V1\MetadataStore::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\Operation::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -Øo -1google/cloud/aiplatform/v1/metadata_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/cloud/aiplatform/v1/artifact.proto(google/cloud/aiplatform/v1/context.proto&google/cloud/aiplatform/v1/event.proto*google/cloud/aiplatform/v1/execution.proto1google/cloud/aiplatform/v1/lineage_subgraph.proto0google/cloud/aiplatform/v1/metadata_schema.proto/google/cloud/aiplatform/v1/metadata_store.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"º +õo +1google/cloud/aiplatform/v1/metadata_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/cloud/aiplatform/v1/artifact.proto(google/cloud/aiplatform/v1/context.proto&google/cloud/aiplatform/v1/event.proto*google/cloud/aiplatform/v1/execution.proto1google/cloud/aiplatform/v1/lineage_subgraph.proto0google/cloud/aiplatform/v1/metadata_schema.proto/google/cloud/aiplatform/v1/metadata_store.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"º CreateMetadataStoreRequest9 parent ( B)àAúA# !locations.googleapis.com/LocationF diff --git a/AiPlatform/metadata/V1/ModelEvaluationSlice.php b/AiPlatform/metadata/V1/ModelEvaluationSlice.php index aea4f1dd6b60..f3a1655b55be 100644 Binary files a/AiPlatform/metadata/V1/ModelEvaluationSlice.php and b/AiPlatform/metadata/V1/ModelEvaluationSlice.php differ diff --git a/AiPlatform/metadata/V1/ModelService.php b/AiPlatform/metadata/V1/ModelService.php index 4a3c07999fd0..b46eb59b24c4 100644 Binary files a/AiPlatform/metadata/V1/ModelService.php and b/AiPlatform/metadata/V1/ModelService.php differ diff --git a/AiPlatform/metadata/V1/NasJob.php b/AiPlatform/metadata/V1/NasJob.php index 4fcaf9e4a1d7..46be5f7bc39f 100644 Binary files a/AiPlatform/metadata/V1/NasJob.php and b/AiPlatform/metadata/V1/NasJob.php differ diff --git a/AiPlatform/metadata/V1/PipelineService.php b/AiPlatform/metadata/V1/PipelineService.php index 0639a81429cc..a3cb1cd89454 100644 --- a/AiPlatform/metadata/V1/PipelineService.php +++ b/AiPlatform/metadata/V1/PipelineService.php @@ -18,6 +18,7 @@ public static function initOnce() { \GPBMetadata\Google\Api\Client::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); + \GPBMetadata\Google\Cloud\Aiplatform\V1\Operation::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\PipelineJob::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\TrainingPipeline::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); @@ -25,8 +26,8 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -à! -1google/cloud/aiplatform/v1/pipeline_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/aiplatform/v1/pipeline_job.proto2google/cloud/aiplatform/v1/training_pipeline.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"¨ +Œ" +1google/cloud/aiplatform/v1/pipeline_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto*google/cloud/aiplatform/v1/operation.proto-google/cloud/aiplatform/v1/pipeline_job.proto2google/cloud/aiplatform/v1/training_pipeline.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"¨ CreateTrainingPipelineRequest9 parent ( B)àAúA# !locations.googleapis.com/LocationL diff --git a/AiPlatform/metadata/V1/SpecialistPoolService.php b/AiPlatform/metadata/V1/SpecialistPoolService.php index fc5313dd1c51..306313392395 100644 --- a/AiPlatform/metadata/V1/SpecialistPoolService.php +++ b/AiPlatform/metadata/V1/SpecialistPoolService.php @@ -21,11 +21,12 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Aiplatform\V1\Operation::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\SpecialistPool::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -Å -8google/cloud/aiplatform/v1/specialist_pool_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto*google/cloud/aiplatform/v1/operation.proto0google/cloud/aiplatform/v1/specialist_pool.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"¢ +â +8google/cloud/aiplatform/v1/specialist_pool_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto*google/cloud/aiplatform/v1/operation.proto0google/cloud/aiplatform/v1/specialist_pool.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"¢ CreateSpecialistPoolRequest9 parent ( B)àAúA# !locations.googleapis.com/LocationH diff --git a/AiPlatform/metadata/V1/TensorboardService.php b/AiPlatform/metadata/V1/TensorboardService.php index 90cc72bb09fb..4f1c5958cb4c 100644 --- a/AiPlatform/metadata/V1/TensorboardService.php +++ b/AiPlatform/metadata/V1/TensorboardService.php @@ -25,11 +25,12 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Aiplatform\V1\TensorboardRun::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\TensorboardTimeSeries::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -Îx -4google/cloud/aiplatform/v1/tensorboard_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto*google/cloud/aiplatform/v1/operation.proto,google/cloud/aiplatform/v1/tensorboard.proto1google/cloud/aiplatform/v1/tensorboard_data.proto7google/cloud/aiplatform/v1/tensorboard_experiment.proto0google/cloud/aiplatform/v1/tensorboard_run.proto8google/cloud/aiplatform/v1/tensorboard_time_series.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto"œ +ëx +4google/cloud/aiplatform/v1/tensorboard_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto*google/cloud/aiplatform/v1/operation.proto,google/cloud/aiplatform/v1/tensorboard.proto1google/cloud/aiplatform/v1/tensorboard_data.proto7google/cloud/aiplatform/v1/tensorboard_experiment.proto0google/cloud/aiplatform/v1/tensorboard_run.proto8google/cloud/aiplatform/v1/tensorboard_time_series.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"œ CreateTensorboardRequest= parent ( B-àAúA\' %aiplatform.googleapis.com/TensorboardA diff --git a/AiPlatform/samples/V1/EndpointServiceClient/deploy_model.php b/AiPlatform/samples/V1/EndpointServiceClient/deploy_model.php index 17964ebe0acf..67ffe7d3715c 100644 --- a/AiPlatform/samples/V1/EndpointServiceClient/deploy_model.php +++ b/AiPlatform/samples/V1/EndpointServiceClient/deploy_model.php @@ -42,7 +42,11 @@ * Endpoint. * * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be deployed. Please see + * version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. Please see * {@see EndpointServiceClient::modelName()} for help formatting this field. */ function deploy_model_sample(string $formattedEndpoint, string $formattedDeployedModelModel): void diff --git a/AiPlatform/samples/V1/FeaturestoreServiceClient/delete_feature_values.php b/AiPlatform/samples/V1/FeaturestoreServiceClient/delete_feature_values.php new file mode 100644 index 000000000000..1e499f2ff23c --- /dev/null +++ b/AiPlatform/samples/V1/FeaturestoreServiceClient/delete_feature_values.php @@ -0,0 +1,94 @@ +deleteFeatureValues($formattedEntityType); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeleteFeatureValuesResponse $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 +{ + $formattedEntityType = FeaturestoreServiceClient::entityTypeName( + '[PROJECT]', + '[LOCATION]', + '[FEATURESTORE]', + '[ENTITY_TYPE]' + ); + + delete_feature_values_sample($formattedEntityType); +} +// [END aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_sync] diff --git a/AiPlatform/samples/V1/ModelServiceClient/batch_import_evaluated_annotations.php b/AiPlatform/samples/V1/ModelServiceClient/batch_import_evaluated_annotations.php new file mode 100644 index 000000000000..05fa8f517421 --- /dev/null +++ b/AiPlatform/samples/V1/ModelServiceClient/batch_import_evaluated_annotations.php @@ -0,0 +1,81 @@ +batchImportEvaluatedAnnotations( + $formattedParent, + $evaluatedAnnotations + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ModelServiceClient::modelEvaluationSliceName( + '[PROJECT]', + '[LOCATION]', + '[MODEL]', + '[EVALUATION]', + '[SLICE]' + ); + + batch_import_evaluated_annotations_sample($formattedParent); +} +// [END aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_sync] diff --git a/AiPlatform/samples/V1/ModelServiceClient/delete_model_version.php b/AiPlatform/samples/V1/ModelServiceClient/delete_model_version.php index 788e7fbe237a..89d3deff95e6 100644 --- a/AiPlatform/samples/V1/ModelServiceClient/delete_model_version.php +++ b/AiPlatform/samples/V1/ModelServiceClient/delete_model_version.php @@ -31,8 +31,9 @@ /** * Deletes a Model version. * - * Model version can only be deleted if there are no [DeployedModels][] - * created from it. Deleting the only version in the Model is not allowed. Use + * Model version can only be deleted if there are no + * [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. + * Deleting the only version in the Model is not allowed. Use * [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for * deleting the Model instead. * diff --git a/AiPlatform/samples/V1/VizierServiceClient/check_trial_early_stopping_state.php b/AiPlatform/samples/V1/VizierServiceClient/check_trial_early_stopping_state.php index 6258674f225f..b1dff1a0ff66 100644 --- a/AiPlatform/samples/V1/VizierServiceClient/check_trial_early_stopping_state.php +++ b/AiPlatform/samples/V1/VizierServiceClient/check_trial_early_stopping_state.php @@ -33,7 +33,7 @@ * Checks whether a Trial should stop or not. Returns a * long-running operation. When the operation is successful, * it will contain a - * [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse]. + * [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse]. * * @param string $formattedTrialName The Trial's name. * Format: diff --git a/AiPlatform/src/V1/AcceleratorType.php b/AiPlatform/src/V1/AcceleratorType.php index 3d15c1eb190c..6648fc436ab7 100644 --- a/AiPlatform/src/V1/AcceleratorType.php +++ b/AiPlatform/src/V1/AcceleratorType.php @@ -8,6 +8,7 @@ /** * Represents a hardware accelerator type. + * NEXT ID: 11. * * Protobuf type google.cloud.aiplatform.v1.AcceleratorType */ @@ -67,6 +68,12 @@ class AcceleratorType * Generated from protobuf enum TPU_V3 = 7; */ const TPU_V3 = 7; + /** + * TPU v4. + * + * Generated from protobuf enum TPU_V4_POD = 10; + */ + const TPU_V4_POD = 10; private static $valueToName = [ self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', @@ -78,6 +85,7 @@ class AcceleratorType self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', self::TPU_V2 => 'TPU_V2', self::TPU_V3 => 'TPU_V3', + self::TPU_V4_POD => 'TPU_V4_POD', ]; public static function name($value) diff --git a/AiPlatform/src/V1/BatchImportEvaluatedAnnotationsRequest.php b/AiPlatform/src/V1/BatchImportEvaluatedAnnotationsRequest.php new file mode 100644 index 000000000000..dbf038873d7e --- /dev/null +++ b/AiPlatform/src/V1/BatchImportEvaluatedAnnotationsRequest.php @@ -0,0 +1,110 @@ +google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + */ +class BatchImportEvaluatedAnnotationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. Evaluated annotations resource to be imported. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.EvaluatedAnnotation evaluated_annotations = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $evaluated_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * @type array<\Google\Cloud\AIPlatform\V1\EvaluatedAnnotation>|\Google\Protobuf\Internal\RepeatedField $evaluated_annotations + * Required. Evaluated annotations resource to be imported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * + * 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 parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * + * 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. Evaluated annotations resource to be imported. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.EvaluatedAnnotation evaluated_annotations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvaluatedAnnotations() + { + return $this->evaluated_annotations; + } + + /** + * Required. Evaluated annotations resource to be imported. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.EvaluatedAnnotation evaluated_annotations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\EvaluatedAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvaluatedAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\EvaluatedAnnotation::class); + $this->evaluated_annotations = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/BatchImportEvaluatedAnnotationsResponse.php b/AiPlatform/src/V1/BatchImportEvaluatedAnnotationsResponse.php new file mode 100644 index 000000000000..b7e21ae9d604 --- /dev/null +++ b/AiPlatform/src/V1/BatchImportEvaluatedAnnotationsResponse.php @@ -0,0 +1,68 @@ +google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + */ +class BatchImportEvaluatedAnnotationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Number of EvaluatedAnnotations imported. + * + * Generated from protobuf field int32 imported_evaluated_annotations_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $imported_evaluated_annotations_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $imported_evaluated_annotations_count + * Output only. Number of EvaluatedAnnotations imported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Number of EvaluatedAnnotations imported. + * + * Generated from protobuf field int32 imported_evaluated_annotations_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getImportedEvaluatedAnnotationsCount() + { + return $this->imported_evaluated_annotations_count; + } + + /** + * Output only. Number of EvaluatedAnnotations imported. + * + * Generated from protobuf field int32 imported_evaluated_annotations_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setImportedEvaluatedAnnotationsCount($var) + { + GPBUtil::checkInt32($var); + $this->imported_evaluated_annotations_count = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/BatchPredictionJob.php b/AiPlatform/src/V1/BatchPredictionJob.php index e76322203831..71568d78b0a5 100644 --- a/AiPlatform/src/V1/BatchPredictionJob.php +++ b/AiPlatform/src/V1/BatchPredictionJob.php @@ -39,7 +39,11 @@ class BatchPredictionJob extends \Google\Protobuf\Internal\Message * and their resources. * Exactly one of model and unmanaged_container_model must be set. * The model resource name may contain version id or version alias to specify - * the version, if no version is specified, the default version will be used. + * the version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * * Generated from protobuf field string model = 3 [(.google.api.resource_reference) = { */ @@ -259,6 +263,17 @@ class BatchPredictionJob extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; */ private $encryption_spec = null; + /** + * For custom-trained Models and AutoML Tabular Models, the container of the + * DeployedModel instances will send `stderr` and `stdout` streams to + * Stackdriver Logging by default. Please note that the logs incur cost, + * which are subject to [Cloud Logging + * pricing](https://cloud.google.com/stackdriver/pricing). + * User can disable container logging by setting this flag to true. + * + * Generated from protobuf field bool disable_container_logging = 34; + */ + private $disable_container_logging = false; /** * Constructor. @@ -277,7 +292,11 @@ class BatchPredictionJob extends \Google\Protobuf\Internal\Message * and their resources. * Exactly one of model and unmanaged_container_model must be set. * The model resource name may contain version id or version alias to specify - * the version, if no version is specified, the default version will be used. + * the version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * @type string $model_version_id * Output only. The version ID of the Model that produces the predictions via * this job. @@ -401,6 +420,13 @@ class BatchPredictionJob extends \Google\Protobuf\Internal\Message * Customer-managed encryption key options for a BatchPredictionJob. If this * is set, then all resources created by the BatchPredictionJob will be * encrypted with the provided encryption key. + * @type bool $disable_container_logging + * For custom-trained Models and AutoML Tabular Models, the container of the + * DeployedModel instances will send `stderr` and `stdout` streams to + * Stackdriver Logging by default. Please note that the logs incur cost, + * which are subject to [Cloud Logging + * pricing](https://cloud.google.com/stackdriver/pricing). + * User can disable container logging by setting this flag to true. * } */ public function __construct($data = NULL) { @@ -467,7 +493,11 @@ public function setDisplayName($var) * and their resources. * Exactly one of model and unmanaged_container_model must be set. * The model resource name may contain version id or version alias to specify - * the version, if no version is specified, the default version will be used. + * the version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * * Generated from protobuf field string model = 3 [(.google.api.resource_reference) = { * @return string @@ -484,7 +514,11 @@ public function getModel() * and their resources. * Exactly one of model and unmanaged_container_model must be set. * The model resource name may contain version id or version alias to specify - * the version, if no version is specified, the default version will be used. + * the version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * * Generated from protobuf field string model = 3 [(.google.api.resource_reference) = { * @param string $var @@ -1420,5 +1454,41 @@ public function setEncryptionSpec($var) return $this; } + /** + * For custom-trained Models and AutoML Tabular Models, the container of the + * DeployedModel instances will send `stderr` and `stdout` streams to + * Stackdriver Logging by default. Please note that the logs incur cost, + * which are subject to [Cloud Logging + * pricing](https://cloud.google.com/stackdriver/pricing). + * User can disable container logging by setting this flag to true. + * + * Generated from protobuf field bool disable_container_logging = 34; + * @return bool + */ + public function getDisableContainerLogging() + { + return $this->disable_container_logging; + } + + /** + * For custom-trained Models and AutoML Tabular Models, the container of the + * DeployedModel instances will send `stderr` and `stdout` streams to + * Stackdriver Logging by default. Please note that the logs incur cost, + * which are subject to [Cloud Logging + * pricing](https://cloud.google.com/stackdriver/pricing). + * User can disable container logging by setting this flag to true. + * + * Generated from protobuf field bool disable_container_logging = 34; + * @param bool $var + * @return $this + */ + public function setDisableContainerLogging($var) + { + GPBUtil::checkBool($var); + $this->disable_container_logging = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/DeleteFeatureValuesOperationMetadata.php b/AiPlatform/src/V1/DeleteFeatureValuesOperationMetadata.php new file mode 100644 index 000000000000..5ddb4bbccc35 --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesOperationMetadata.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + */ +class DeleteFeatureValuesOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation metadata for Featurestore delete Features values. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * Operation metadata for Featurestore delete Features values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Operation metadata for Featurestore delete Features values. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * Operation metadata for Featurestore delete Features values. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DeleteFeatureValuesRequest.php b/AiPlatform/src/V1/DeleteFeatureValuesRequest.php new file mode 100644 index 000000000000..2492e6ec08b1 --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesRequest.php @@ -0,0 +1,154 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + */ +class DeleteFeatureValuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * + * Generated from protobuf field string entity_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $entity_type = ''; + protected $DeleteOption; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectEntity $select_entity + * Select feature values to be deleted by specifying entities. + * @type \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectTimeRangeAndFeature $select_time_range_and_feature + * Select feature values to be deleted by specifying time range and + * features. + * @type string $entity_type + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Select feature values to be deleted by specifying entities. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity select_entity = 2; + * @return \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectEntity|null + */ + public function getSelectEntity() + { + return $this->readOneof(2); + } + + public function hasSelectEntity() + { + return $this->hasOneof(2); + } + + /** + * Select feature values to be deleted by specifying entities. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity select_entity = 2; + * @param \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectEntity $var + * @return $this + */ + public function setSelectEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectEntity::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Select feature values to be deleted by specifying time range and + * features. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature select_time_range_and_feature = 3; + * @return \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectTimeRangeAndFeature|null + */ + public function getSelectTimeRangeAndFeature() + { + return $this->readOneof(3); + } + + public function hasSelectTimeRangeAndFeature() + { + return $this->hasOneof(3); + } + + /** + * Select feature values to be deleted by specifying time range and + * features. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature select_time_range_and_feature = 3; + * @param \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectTimeRangeAndFeature $var + * @return $this + */ + public function setSelectTimeRangeAndFeature($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectTimeRangeAndFeature::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * + * Generated from protobuf field string entity_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * + * Generated from protobuf field string entity_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkString($var, True); + $this->entity_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getDeleteOption() + { + return $this->whichOneof("DeleteOption"); + } + +} + diff --git a/AiPlatform/src/V1/DeleteFeatureValuesRequest/SelectEntity.php b/AiPlatform/src/V1/DeleteFeatureValuesRequest/SelectEntity.php new file mode 100644 index 000000000000..7803ac465b7f --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesRequest/SelectEntity.php @@ -0,0 +1,84 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + */ +class SelectEntity extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Selectors choosing feature values of which entity id to be + * deleted from the EntityType. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EntityIdSelector entity_id_selector = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entity_id_selector = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\EntityIdSelector $entity_id_selector + * Required. Selectors choosing feature values of which entity id to be + * deleted from the EntityType. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Selectors choosing feature values of which entity id to be + * deleted from the EntityType. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EntityIdSelector entity_id_selector = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\EntityIdSelector|null + */ + public function getEntityIdSelector() + { + return $this->entity_id_selector; + } + + public function hasEntityIdSelector() + { + return isset($this->entity_id_selector); + } + + public function clearEntityIdSelector() + { + unset($this->entity_id_selector); + } + + /** + * Required. Selectors choosing feature values of which entity id to be + * deleted from the EntityType. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EntityIdSelector entity_id_selector = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\EntityIdSelector $var + * @return $this + */ + public function setEntityIdSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\EntityIdSelector::class); + $this->entity_id_selector = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/DeleteFeatureValuesRequest/SelectTimeRangeAndFeature.php b/AiPlatform/src/V1/DeleteFeatureValuesRequest/SelectTimeRangeAndFeature.php new file mode 100644 index 000000000000..bb55bd270154 --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesRequest/SelectTimeRangeAndFeature.php @@ -0,0 +1,177 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + */ +class SelectTimeRangeAndFeature extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Select feature generated within a half-inclusive time range. + * The time range is lower inclusive and upper exclusive. + * + * Generated from protobuf field .google.type.Interval time_range = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $time_range = null; + /** + * Required. Selectors choosing which feature values to be deleted from the + * EntityType. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureSelector feature_selector = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $feature_selector = null; + /** + * If set, data will not be deleted from online storage. + * When time range is older than the data in online storage, setting this to + * be true will make the deletion have no impact on online serving. + * + * Generated from protobuf field bool skip_online_storage_delete = 3; + */ + private $skip_online_storage_delete = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Interval $time_range + * Required. Select feature generated within a half-inclusive time range. + * The time range is lower inclusive and upper exclusive. + * @type \Google\Cloud\AIPlatform\V1\FeatureSelector $feature_selector + * Required. Selectors choosing which feature values to be deleted from the + * EntityType. + * @type bool $skip_online_storage_delete + * If set, data will not be deleted from online storage. + * When time range is older than the data in online storage, setting this to + * be true will make the deletion have no impact on online serving. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Select feature generated within a half-inclusive time range. + * The time range is lower inclusive and upper exclusive. + * + * Generated from protobuf field .google.type.Interval time_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Interval|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Required. Select feature generated within a half-inclusive time range. + * The time range is lower inclusive and upper exclusive. + * + * Generated from protobuf field .google.type.Interval time_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->time_range = $var; + + return $this; + } + + /** + * Required. Selectors choosing which feature values to be deleted from the + * EntityType. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureSelector feature_selector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\FeatureSelector|null + */ + public function getFeatureSelector() + { + return $this->feature_selector; + } + + public function hasFeatureSelector() + { + return isset($this->feature_selector); + } + + public function clearFeatureSelector() + { + unset($this->feature_selector); + } + + /** + * Required. Selectors choosing which feature values to be deleted from the + * EntityType. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureSelector feature_selector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\FeatureSelector $var + * @return $this + */ + public function setFeatureSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureSelector::class); + $this->feature_selector = $var; + + return $this; + } + + /** + * If set, data will not be deleted from online storage. + * When time range is older than the data in online storage, setting this to + * be true will make the deletion have no impact on online serving. + * + * Generated from protobuf field bool skip_online_storage_delete = 3; + * @return bool + */ + public function getSkipOnlineStorageDelete() + { + return $this->skip_online_storage_delete; + } + + /** + * If set, data will not be deleted from online storage. + * When time range is older than the data in online storage, setting this to + * be true will make the deletion have no impact on online serving. + * + * Generated from protobuf field bool skip_online_storage_delete = 3; + * @param bool $var + * @return $this + */ + public function setSkipOnlineStorageDelete($var) + { + GPBUtil::checkBool($var); + $this->skip_online_storage_delete = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/DeleteFeatureValuesResponse.php b/AiPlatform/src/V1/DeleteFeatureValuesResponse.php new file mode 100644 index 000000000000..f0d0289e26ac --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesResponse.php @@ -0,0 +1,109 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + */ +class DeleteFeatureValuesResponse extends \Google\Protobuf\Internal\Message +{ + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectEntity $select_entity + * Response for request specifying the entities to delete + * @type \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectTimeRangeAndFeature $select_time_range_and_feature + * Response for request specifying time range and feature + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Response for request specifying the entities to delete + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity select_entity = 1; + * @return \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectEntity|null + */ + public function getSelectEntity() + { + return $this->readOneof(1); + } + + public function hasSelectEntity() + { + return $this->hasOneof(1); + } + + /** + * Response for request specifying the entities to delete + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity select_entity = 1; + * @param \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectEntity $var + * @return $this + */ + public function setSelectEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectEntity::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Response for request specifying time range and feature + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature select_time_range_and_feature = 2; + * @return \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectTimeRangeAndFeature|null + */ + public function getSelectTimeRangeAndFeature() + { + return $this->readOneof(2); + } + + public function hasSelectTimeRangeAndFeature() + { + return $this->hasOneof(2); + } + + /** + * Response for request specifying time range and feature + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature select_time_range_and_feature = 2; + * @param \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectTimeRangeAndFeature $var + * @return $this + */ + public function setSelectTimeRangeAndFeature($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse\SelectTimeRangeAndFeature::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/AiPlatform/src/V1/DeleteFeatureValuesResponse/SelectEntity.php b/AiPlatform/src/V1/DeleteFeatureValuesResponse/SelectEntity.php new file mode 100644 index 000000000000..92bfa3d129ca --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesResponse/SelectEntity.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + */ +class SelectEntity extends \Google\Protobuf\Internal\Message +{ + /** + * The count of deleted entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * + * Generated from protobuf field int64 offline_storage_deleted_entity_row_count = 1; + */ + private $offline_storage_deleted_entity_row_count = 0; + /** + * The count of deleted entities in the online storage. + * Each entity ID corresponds to one entity. + * + * Generated from protobuf field int64 online_storage_deleted_entity_count = 2; + */ + private $online_storage_deleted_entity_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offline_storage_deleted_entity_row_count + * The count of deleted entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * @type int|string $online_storage_deleted_entity_count + * The count of deleted entities in the online storage. + * Each entity ID corresponds to one entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * The count of deleted entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * + * Generated from protobuf field int64 offline_storage_deleted_entity_row_count = 1; + * @return int|string + */ + public function getOfflineStorageDeletedEntityRowCount() + { + return $this->offline_storage_deleted_entity_row_count; + } + + /** + * The count of deleted entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * + * Generated from protobuf field int64 offline_storage_deleted_entity_row_count = 1; + * @param int|string $var + * @return $this + */ + public function setOfflineStorageDeletedEntityRowCount($var) + { + GPBUtil::checkInt64($var); + $this->offline_storage_deleted_entity_row_count = $var; + + return $this; + } + + /** + * The count of deleted entities in the online storage. + * Each entity ID corresponds to one entity. + * + * Generated from protobuf field int64 online_storage_deleted_entity_count = 2; + * @return int|string + */ + public function getOnlineStorageDeletedEntityCount() + { + return $this->online_storage_deleted_entity_count; + } + + /** + * The count of deleted entities in the online storage. + * Each entity ID corresponds to one entity. + * + * Generated from protobuf field int64 online_storage_deleted_entity_count = 2; + * @param int|string $var + * @return $this + */ + public function setOnlineStorageDeletedEntityCount($var) + { + GPBUtil::checkInt64($var); + $this->online_storage_deleted_entity_count = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/DeleteFeatureValuesResponse/SelectTimeRangeAndFeature.php b/AiPlatform/src/V1/DeleteFeatureValuesResponse/SelectTimeRangeAndFeature.php new file mode 100644 index 000000000000..0dc5452a0345 --- /dev/null +++ b/AiPlatform/src/V1/DeleteFeatureValuesResponse/SelectTimeRangeAndFeature.php @@ -0,0 +1,168 @@ +google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + */ +class SelectTimeRangeAndFeature extends \Google\Protobuf\Internal\Message +{ + /** + * The count of the features or columns impacted. + * This is the same as the feature count in the request. + * + * Generated from protobuf field int64 impacted_feature_count = 1; + */ + private $impacted_feature_count = 0; + /** + * The count of modified entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * Within each row, only the features specified in the request are + * deleted. + * + * Generated from protobuf field int64 offline_storage_modified_entity_row_count = 2; + */ + private $offline_storage_modified_entity_row_count = 0; + /** + * The count of modified entities in the online storage. + * Each entity ID corresponds to one entity. + * Within each entity, only the features specified in the request are + * deleted. + * + * Generated from protobuf field int64 online_storage_modified_entity_count = 3; + */ + private $online_storage_modified_entity_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $impacted_feature_count + * The count of the features or columns impacted. + * This is the same as the feature count in the request. + * @type int|string $offline_storage_modified_entity_row_count + * The count of modified entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * Within each row, only the features specified in the request are + * deleted. + * @type int|string $online_storage_modified_entity_count + * The count of modified entities in the online storage. + * Each entity ID corresponds to one entity. + * Within each entity, only the features specified in the request are + * deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * The count of the features or columns impacted. + * This is the same as the feature count in the request. + * + * Generated from protobuf field int64 impacted_feature_count = 1; + * @return int|string + */ + public function getImpactedFeatureCount() + { + return $this->impacted_feature_count; + } + + /** + * The count of the features or columns impacted. + * This is the same as the feature count in the request. + * + * Generated from protobuf field int64 impacted_feature_count = 1; + * @param int|string $var + * @return $this + */ + public function setImpactedFeatureCount($var) + { + GPBUtil::checkInt64($var); + $this->impacted_feature_count = $var; + + return $this; + } + + /** + * The count of modified entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * Within each row, only the features specified in the request are + * deleted. + * + * Generated from protobuf field int64 offline_storage_modified_entity_row_count = 2; + * @return int|string + */ + public function getOfflineStorageModifiedEntityRowCount() + { + return $this->offline_storage_modified_entity_row_count; + } + + /** + * The count of modified entity rows in the offline storage. + * Each row corresponds to the combination of an entity ID and a timestamp. + * One entity ID can have multiple rows in the offline storage. + * Within each row, only the features specified in the request are + * deleted. + * + * Generated from protobuf field int64 offline_storage_modified_entity_row_count = 2; + * @param int|string $var + * @return $this + */ + public function setOfflineStorageModifiedEntityRowCount($var) + { + GPBUtil::checkInt64($var); + $this->offline_storage_modified_entity_row_count = $var; + + return $this; + } + + /** + * The count of modified entities in the online storage. + * Each entity ID corresponds to one entity. + * Within each entity, only the features specified in the request are + * deleted. + * + * Generated from protobuf field int64 online_storage_modified_entity_count = 3; + * @return int|string + */ + public function getOnlineStorageModifiedEntityCount() + { + return $this->online_storage_modified_entity_count; + } + + /** + * The count of modified entities in the online storage. + * Each entity ID corresponds to one entity. + * Within each entity, only the features specified in the request are + * deleted. + * + * Generated from protobuf field int64 online_storage_modified_entity_count = 3; + * @param int|string $var + * @return $this + */ + public function setOnlineStorageModifiedEntityCount($var) + { + GPBUtil::checkInt64($var); + $this->online_storage_modified_entity_count = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/DeployedModel.php b/AiPlatform/src/V1/DeployedModel.php index 69b01fa87cd0..c66f479baf55 100644 --- a/AiPlatform/src/V1/DeployedModel.php +++ b/AiPlatform/src/V1/DeployedModel.php @@ -28,7 +28,11 @@ class DeployedModel extends \Google\Protobuf\Internal\Message * Note that the Model may be in a different location than the DeployedModel's * Endpoint. * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be deployed. + * version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -139,7 +143,11 @@ class DeployedModel extends \Google\Protobuf\Internal\Message * Note that the Model may be in a different location than the DeployedModel's * Endpoint. * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be deployed. + * version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * @type string $model_version_id * Output only. The version ID of the model that is deployed. * @type string $display_name @@ -299,7 +307,11 @@ public function setId($var) * Note that the Model may be in a different location than the DeployedModel's * Endpoint. * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be deployed. + * version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -314,7 +326,11 @@ public function getModel() * Note that the Model may be in a different location than the DeployedModel's * Endpoint. * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be deployed. + * version. + * Example: `projects/{project}/locations/{location}/models/{model}@2` + * or + * `projects/{project}/locations/{location}/models/{model}@golden` + * if no version is specified, the default version will be deployed. * * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AiPlatform/src/V1/EntityIdSelector.php b/AiPlatform/src/V1/EntityIdSelector.php new file mode 100644 index 000000000000..9adea3b06f00 --- /dev/null +++ b/AiPlatform/src/V1/EntityIdSelector.php @@ -0,0 +1,113 @@ +google.cloud.aiplatform.v1.EntityIdSelector + */ +class EntityIdSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Source column that holds entity IDs. If not provided, entity IDs are + * extracted from the column named `entity_id`. + * + * Generated from protobuf field string entity_id_field = 5; + */ + private $entity_id_field = ''; + protected $EntityIdsSource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\CsvSource $csv_source + * Source of Csv + * @type string $entity_id_field + * Source column that holds entity IDs. If not provided, entity IDs are + * extracted from the column named `entity_id`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Source of Csv + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CsvSource csv_source = 3; + * @return \Google\Cloud\AIPlatform\V1\CsvSource|null + */ + public function getCsvSource() + { + return $this->readOneof(3); + } + + public function hasCsvSource() + { + return $this->hasOneof(3); + } + + /** + * Source of Csv + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CsvSource csv_source = 3; + * @param \Google\Cloud\AIPlatform\V1\CsvSource $var + * @return $this + */ + public function setCsvSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CsvSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Source column that holds entity IDs. If not provided, entity IDs are + * extracted from the column named `entity_id`. + * + * Generated from protobuf field string entity_id_field = 5; + * @return string + */ + public function getEntityIdField() + { + return $this->entity_id_field; + } + + /** + * Source column that holds entity IDs. If not provided, entity IDs are + * extracted from the column named `entity_id`. + * + * Generated from protobuf field string entity_id_field = 5; + * @param string $var + * @return $this + */ + public function setEntityIdField($var) + { + GPBUtil::checkString($var, True); + $this->entity_id_field = $var; + + return $this; + } + + /** + * @return string + */ + public function getEntityIdsSource() + { + return $this->whichOneof("EntityIdsSource"); + } + +} + diff --git a/AiPlatform/src/V1/ErrorAnalysisAnnotation.php b/AiPlatform/src/V1/ErrorAnalysisAnnotation.php new file mode 100644 index 000000000000..2f28522fb84b --- /dev/null +++ b/AiPlatform/src/V1/ErrorAnalysisAnnotation.php @@ -0,0 +1,177 @@ +google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + */ +class ErrorAnalysisAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Attributed items for a given annotation, typically representing neighbors + * from the training sets constrained by the query type. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem attributed_items = 1; + */ + private $attributed_items; + /** + * The query type used for finding the attributed items. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType query_type = 2; + */ + private $query_type = 0; + /** + * The outlier score of this annotated item. Usually defined as the min of all + * distances from attributed items. + * + * Generated from protobuf field double outlier_score = 3; + */ + private $outlier_score = 0.0; + /** + * The threshold used to determine if this annotation is an outlier or not. + * + * Generated from protobuf field double outlier_threshold = 4; + */ + private $outlier_threshold = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation\AttributedItem>|\Google\Protobuf\Internal\RepeatedField $attributed_items + * Attributed items for a given annotation, typically representing neighbors + * from the training sets constrained by the query type. + * @type int $query_type + * The query type used for finding the attributed items. + * @type float $outlier_score + * The outlier score of this annotated item. Usually defined as the min of all + * distances from attributed items. + * @type float $outlier_threshold + * The threshold used to determine if this annotation is an outlier or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluatedAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Attributed items for a given annotation, typically representing neighbors + * from the training sets constrained by the query type. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem attributed_items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributedItems() + { + return $this->attributed_items; + } + + /** + * Attributed items for a given annotation, typically representing neighbors + * from the training sets constrained by the query type. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem attributed_items = 1; + * @param array<\Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation\AttributedItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributedItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation\AttributedItem::class); + $this->attributed_items = $arr; + + return $this; + } + + /** + * The query type used for finding the attributed items. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType query_type = 2; + * @return int + */ + public function getQueryType() + { + return $this->query_type; + } + + /** + * The query type used for finding the attributed items. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType query_type = 2; + * @param int $var + * @return $this + */ + public function setQueryType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation\QueryType::class); + $this->query_type = $var; + + return $this; + } + + /** + * The outlier score of this annotated item. Usually defined as the min of all + * distances from attributed items. + * + * Generated from protobuf field double outlier_score = 3; + * @return float + */ + public function getOutlierScore() + { + return $this->outlier_score; + } + + /** + * The outlier score of this annotated item. Usually defined as the min of all + * distances from attributed items. + * + * Generated from protobuf field double outlier_score = 3; + * @param float $var + * @return $this + */ + public function setOutlierScore($var) + { + GPBUtil::checkDouble($var); + $this->outlier_score = $var; + + return $this; + } + + /** + * The threshold used to determine if this annotation is an outlier or not. + * + * Generated from protobuf field double outlier_threshold = 4; + * @return float + */ + public function getOutlierThreshold() + { + return $this->outlier_threshold; + } + + /** + * The threshold used to determine if this annotation is an outlier or not. + * + * Generated from protobuf field double outlier_threshold = 4; + * @param float $var + * @return $this + */ + public function setOutlierThreshold($var) + { + GPBUtil::checkDouble($var); + $this->outlier_threshold = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ErrorAnalysisAnnotation/AttributedItem.php b/AiPlatform/src/V1/ErrorAnalysisAnnotation/AttributedItem.php new file mode 100644 index 000000000000..7fc6ce7bd84f --- /dev/null +++ b/AiPlatform/src/V1/ErrorAnalysisAnnotation/AttributedItem.php @@ -0,0 +1,107 @@ +google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + */ +class AttributedItem extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID for each annotation. Used by FE to allocate the annotation + * in DB. + * + * Generated from protobuf field string annotation_resource_name = 1; + */ + private $annotation_resource_name = ''; + /** + * The distance of this item to the annotation. + * + * Generated from protobuf field double distance = 2; + */ + private $distance = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $annotation_resource_name + * The unique ID for each annotation. Used by FE to allocate the annotation + * in DB. + * @type float $distance + * The distance of this item to the annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluatedAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID for each annotation. Used by FE to allocate the annotation + * in DB. + * + * Generated from protobuf field string annotation_resource_name = 1; + * @return string + */ + public function getAnnotationResourceName() + { + return $this->annotation_resource_name; + } + + /** + * The unique ID for each annotation. Used by FE to allocate the annotation + * in DB. + * + * Generated from protobuf field string annotation_resource_name = 1; + * @param string $var + * @return $this + */ + public function setAnnotationResourceName($var) + { + GPBUtil::checkString($var, True); + $this->annotation_resource_name = $var; + + return $this; + } + + /** + * The distance of this item to the annotation. + * + * Generated from protobuf field double distance = 2; + * @return float + */ + public function getDistance() + { + return $this->distance; + } + + /** + * The distance of this item to the annotation. + * + * Generated from protobuf field double distance = 2; + * @param float $var + * @return $this + */ + public function setDistance($var) + { + GPBUtil::checkDouble($var); + $this->distance = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/ErrorAnalysisAnnotation/QueryType.php b/AiPlatform/src/V1/ErrorAnalysisAnnotation/QueryType.php new file mode 100644 index 000000000000..9adb88298d27 --- /dev/null +++ b/AiPlatform/src/V1/ErrorAnalysisAnnotation/QueryType.php @@ -0,0 +1,69 @@ +google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType + */ +class QueryType +{ + /** + * Unspecified query type for model error analysis. + * + * Generated from protobuf enum QUERY_TYPE_UNSPECIFIED = 0; + */ + const QUERY_TYPE_UNSPECIFIED = 0; + /** + * Query similar samples across all classes in the dataset. + * + * Generated from protobuf enum ALL_SIMILAR = 1; + */ + const ALL_SIMILAR = 1; + /** + * Query similar samples from the same class of the input sample. + * + * Generated from protobuf enum SAME_CLASS_SIMILAR = 2; + */ + const SAME_CLASS_SIMILAR = 2; + /** + * Query dissimilar samples from the same class of the input sample. + * + * Generated from protobuf enum SAME_CLASS_DISSIMILAR = 3; + */ + const SAME_CLASS_DISSIMILAR = 3; + + private static $valueToName = [ + self::QUERY_TYPE_UNSPECIFIED => 'QUERY_TYPE_UNSPECIFIED', + self::ALL_SIMILAR => 'ALL_SIMILAR', + self::SAME_CLASS_SIMILAR => 'SAME_CLASS_SIMILAR', + self::SAME_CLASS_DISSIMILAR => 'SAME_CLASS_DISSIMILAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/EvaluatedAnnotation.php b/AiPlatform/src/V1/EvaluatedAnnotation.php new file mode 100644 index 000000000000..a25215624a1f --- /dev/null +++ b/AiPlatform/src/V1/EvaluatedAnnotation.php @@ -0,0 +1,443 @@ +google.cloud.aiplatform.v1.EvaluatedAnnotation + */ +class EvaluatedAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Type of the EvaluatedAnnotation. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $type = 0; + /** + * Output only. The model predicted annotations. + * For true positive, there is one and only one prediction, which matches the + * only one ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * For false positive, there is one and only one prediction, which doesn't + * match any ground truth annotation of the corresponding + * [data_item_view_id][EvaluatedAnnotation.data_item_view_id]. + * For false negative, there are zero or more predictions which are similar to + * the only ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths] + * but not enough for a match. + * The schema of the prediction is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * + * Generated from protobuf field repeated .google.protobuf.Value predictions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $predictions; + /** + * Output only. The ground truth Annotations, i.e. the Annotations that exist + * in the test data the Model is evaluated on. + * For true positive, there is one and only one ground truth annotation, which + * matches the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * For false positive, there are zero or more ground truth annotations that + * are similar to the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * but not enough for a match. + * For false negative, there is one and only one ground truth annotation, + * which doesn't match any predictions created by the model. + * The schema of the ground truth is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * + * Generated from protobuf field repeated .google.protobuf.Value ground_truths = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ground_truths; + /** + * Output only. The data item payload that the Model predicted this + * EvaluatedAnnotation on. + * + * Generated from protobuf field .google.protobuf.Value data_item_payload = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $data_item_payload = null; + /** + * Output only. ID of the EvaluatedDataItemView under the same ancestor + * ModelEvaluation. The EvaluatedDataItemView consists of all ground truths + * and predictions on + * [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * Can be passed in + * [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] + * [id][GetEvaluatedDataItemViewRequest.id]. + * + * Generated from protobuf field string evaluated_data_item_view_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $evaluated_data_item_view_id = ''; + /** + * Explanations of + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * Each element of the explanations indicates the explanation for one + * explanation Method. + * The attributions list in the + * [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation] + * object corresponds to the + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions] + * list. For example, the second element in the attributions list explains the + * second element in the predictions list. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation explanations = 8; + */ + private $explanations; + /** + * Annotations of model error analysis results. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation error_analysis_annotations = 9; + */ + private $error_analysis_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Output only. Type of the EvaluatedAnnotation. + * @type array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $predictions + * Output only. The model predicted annotations. + * For true positive, there is one and only one prediction, which matches the + * only one ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * For false positive, there is one and only one prediction, which doesn't + * match any ground truth annotation of the corresponding + * [data_item_view_id][EvaluatedAnnotation.data_item_view_id]. + * For false negative, there are zero or more predictions which are similar to + * the only ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths] + * but not enough for a match. + * The schema of the prediction is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * @type array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $ground_truths + * Output only. The ground truth Annotations, i.e. the Annotations that exist + * in the test data the Model is evaluated on. + * For true positive, there is one and only one ground truth annotation, which + * matches the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * For false positive, there are zero or more ground truth annotations that + * are similar to the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * but not enough for a match. + * For false negative, there is one and only one ground truth annotation, + * which doesn't match any predictions created by the model. + * The schema of the ground truth is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * @type \Google\Protobuf\Value $data_item_payload + * Output only. The data item payload that the Model predicted this + * EvaluatedAnnotation on. + * @type string $evaluated_data_item_view_id + * Output only. ID of the EvaluatedDataItemView under the same ancestor + * ModelEvaluation. The EvaluatedDataItemView consists of all ground truths + * and predictions on + * [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * Can be passed in + * [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] + * [id][GetEvaluatedDataItemViewRequest.id]. + * @type array<\Google\Cloud\AIPlatform\V1\EvaluatedAnnotationExplanation>|\Google\Protobuf\Internal\RepeatedField $explanations + * Explanations of + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * Each element of the explanations indicates the explanation for one + * explanation Method. + * The attributions list in the + * [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation] + * object corresponds to the + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions] + * list. For example, the second element in the attributions list explains the + * second element in the predictions list. + * @type array<\Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation>|\Google\Protobuf\Internal\RepeatedField $error_analysis_annotations + * Annotations of model error analysis results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluatedAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Type of the EvaluatedAnnotation. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type of the EvaluatedAnnotation. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\EvaluatedAnnotation\EvaluatedAnnotationType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The model predicted annotations. + * For true positive, there is one and only one prediction, which matches the + * only one ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * For false positive, there is one and only one prediction, which doesn't + * match any ground truth annotation of the corresponding + * [data_item_view_id][EvaluatedAnnotation.data_item_view_id]. + * For false negative, there are zero or more predictions which are similar to + * the only ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths] + * but not enough for a match. + * The schema of the prediction is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * + * Generated from protobuf field repeated .google.protobuf.Value predictions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPredictions() + { + return $this->predictions; + } + + /** + * Output only. The model predicted annotations. + * For true positive, there is one and only one prediction, which matches the + * only one ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * For false positive, there is one and only one prediction, which doesn't + * match any ground truth annotation of the corresponding + * [data_item_view_id][EvaluatedAnnotation.data_item_view_id]. + * For false negative, there are zero or more predictions which are similar to + * the only ground truth annotation in + * [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths] + * but not enough for a match. + * The schema of the prediction is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * + * Generated from protobuf field repeated .google.protobuf.Value predictions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPredictions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->predictions = $arr; + + return $this; + } + + /** + * Output only. The ground truth Annotations, i.e. the Annotations that exist + * in the test data the Model is evaluated on. + * For true positive, there is one and only one ground truth annotation, which + * matches the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * For false positive, there are zero or more ground truth annotations that + * are similar to the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * but not enough for a match. + * For false negative, there is one and only one ground truth annotation, + * which doesn't match any predictions created by the model. + * The schema of the ground truth is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * + * Generated from protobuf field repeated .google.protobuf.Value ground_truths = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroundTruths() + { + return $this->ground_truths; + } + + /** + * Output only. The ground truth Annotations, i.e. the Annotations that exist + * in the test data the Model is evaluated on. + * For true positive, there is one and only one ground truth annotation, which + * matches the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * For false positive, there are zero or more ground truth annotations that + * are similar to the only prediction in + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * but not enough for a match. + * For false negative, there is one and only one ground truth annotation, + * which doesn't match any predictions created by the model. + * The schema of the ground truth is stored in + * [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + * + * Generated from protobuf field repeated .google.protobuf.Value ground_truths = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroundTruths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->ground_truths = $arr; + + return $this; + } + + /** + * Output only. The data item payload that the Model predicted this + * EvaluatedAnnotation on. + * + * Generated from protobuf field .google.protobuf.Value data_item_payload = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Value|null + */ + public function getDataItemPayload() + { + return $this->data_item_payload; + } + + public function hasDataItemPayload() + { + return isset($this->data_item_payload); + } + + public function clearDataItemPayload() + { + unset($this->data_item_payload); + } + + /** + * Output only. The data item payload that the Model predicted this + * EvaluatedAnnotation on. + * + * Generated from protobuf field .google.protobuf.Value data_item_payload = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setDataItemPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->data_item_payload = $var; + + return $this; + } + + /** + * Output only. ID of the EvaluatedDataItemView under the same ancestor + * ModelEvaluation. The EvaluatedDataItemView consists of all ground truths + * and predictions on + * [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * Can be passed in + * [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] + * [id][GetEvaluatedDataItemViewRequest.id]. + * + * Generated from protobuf field string evaluated_data_item_view_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEvaluatedDataItemViewId() + { + return $this->evaluated_data_item_view_id; + } + + /** + * Output only. ID of the EvaluatedDataItemView under the same ancestor + * ModelEvaluation. The EvaluatedDataItemView consists of all ground truths + * and predictions on + * [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * Can be passed in + * [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] + * [id][GetEvaluatedDataItemViewRequest.id]. + * + * Generated from protobuf field string evaluated_data_item_view_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEvaluatedDataItemViewId($var) + { + GPBUtil::checkString($var, True); + $this->evaluated_data_item_view_id = $var; + + return $this; + } + + /** + * Explanations of + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * Each element of the explanations indicates the explanation for one + * explanation Method. + * The attributions list in the + * [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation] + * object corresponds to the + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions] + * list. For example, the second element in the attributions list explains the + * second element in the predictions list. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation explanations = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExplanations() + { + return $this->explanations; + } + + /** + * Explanations of + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + * Each element of the explanations indicates the explanation for one + * explanation Method. + * The attributions list in the + * [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation] + * object corresponds to the + * [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions] + * list. For example, the second element in the attributions list explains the + * second element in the predictions list. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation explanations = 8; + * @param array<\Google\Cloud\AIPlatform\V1\EvaluatedAnnotationExplanation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExplanations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\EvaluatedAnnotationExplanation::class); + $this->explanations = $arr; + + return $this; + } + + /** + * Annotations of model error analysis results. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation error_analysis_annotations = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorAnalysisAnnotations() + { + return $this->error_analysis_annotations; + } + + /** + * Annotations of model error analysis results. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ErrorAnalysisAnnotation error_analysis_annotations = 9; + * @param array<\Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorAnalysisAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ErrorAnalysisAnnotation::class); + $this->error_analysis_annotations = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/EvaluatedAnnotation/EvaluatedAnnotationType.php b/AiPlatform/src/V1/EvaluatedAnnotation/EvaluatedAnnotationType.php new file mode 100644 index 000000000000..a776ab51b8ec --- /dev/null +++ b/AiPlatform/src/V1/EvaluatedAnnotation/EvaluatedAnnotationType.php @@ -0,0 +1,72 @@ +google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType + */ +class EvaluatedAnnotationType +{ + /** + * Invalid value. + * + * Generated from protobuf enum EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0; + */ + const EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0; + /** + * The EvaluatedAnnotation is a true positive. It has a prediction created + * by the Model and a ground truth Annotation which the prediction matches. + * + * Generated from protobuf enum TRUE_POSITIVE = 1; + */ + const TRUE_POSITIVE = 1; + /** + * The EvaluatedAnnotation is false positive. It has a prediction created by + * the Model which does not match any ground truth annotation. + * + * Generated from protobuf enum FALSE_POSITIVE = 2; + */ + const FALSE_POSITIVE = 2; + /** + * The EvaluatedAnnotation is false negative. It has a ground truth + * annotation which is not matched by any of the model created predictions. + * + * Generated from protobuf enum FALSE_NEGATIVE = 3; + */ + const FALSE_NEGATIVE = 3; + + private static $valueToName = [ + self::EVALUATED_ANNOTATION_TYPE_UNSPECIFIED => 'EVALUATED_ANNOTATION_TYPE_UNSPECIFIED', + self::TRUE_POSITIVE => 'TRUE_POSITIVE', + self::FALSE_POSITIVE => 'FALSE_POSITIVE', + self::FALSE_NEGATIVE => 'FALSE_NEGATIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/EvaluatedAnnotationExplanation.php b/AiPlatform/src/V1/EvaluatedAnnotationExplanation.php new file mode 100644 index 000000000000..08c2793d276f --- /dev/null +++ b/AiPlatform/src/V1/EvaluatedAnnotationExplanation.php @@ -0,0 +1,123 @@ +google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + */ +class EvaluatedAnnotationExplanation extends \Google\Protobuf\Internal\Message +{ + /** + * Explanation type. + * For AutoML Image Classification models, possible values are: + * * `image-integrated-gradients` + * * `image-xrai` + * + * Generated from protobuf field string explanation_type = 1; + */ + private $explanation_type = ''; + /** + * Explanation attribution response details. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.Explanation explanation = 2; + */ + private $explanation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $explanation_type + * Explanation type. + * For AutoML Image Classification models, possible values are: + * * `image-integrated-gradients` + * * `image-xrai` + * @type \Google\Cloud\AIPlatform\V1\Explanation $explanation + * Explanation attribution response details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluatedAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Explanation type. + * For AutoML Image Classification models, possible values are: + * * `image-integrated-gradients` + * * `image-xrai` + * + * Generated from protobuf field string explanation_type = 1; + * @return string + */ + public function getExplanationType() + { + return $this->explanation_type; + } + + /** + * Explanation type. + * For AutoML Image Classification models, possible values are: + * * `image-integrated-gradients` + * * `image-xrai` + * + * Generated from protobuf field string explanation_type = 1; + * @param string $var + * @return $this + */ + public function setExplanationType($var) + { + GPBUtil::checkString($var, True); + $this->explanation_type = $var; + + return $this; + } + + /** + * Explanation attribution response details. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.Explanation explanation = 2; + * @return \Google\Cloud\AIPlatform\V1\Explanation|null + */ + public function getExplanation() + { + return $this->explanation; + } + + public function hasExplanation() + { + return isset($this->explanation); + } + + public function clearExplanation() + { + unset($this->explanation); + } + + /** + * Explanation attribution response details. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.Explanation explanation = 2; + * @param \Google\Cloud\AIPlatform\V1\Explanation $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Explanation::class); + $this->explanation = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ExportDataConfig.php b/AiPlatform/src/V1/ExportDataConfig.php index 0734b0e9568f..200375f77f40 100644 --- a/AiPlatform/src/V1/ExportDataConfig.php +++ b/AiPlatform/src/V1/ExportDataConfig.php @@ -26,6 +26,7 @@ class ExportDataConfig extends \Google\Protobuf\Internal\Message */ private $annotations_filter = ''; protected $destination; + protected $split; /** * Constructor. @@ -43,6 +44,8 @@ class ExportDataConfig extends \Google\Protobuf\Internal\Message * which are named with the corresponding annotations' schema title. Inside * these sub directories, a schema.yaml will be created to describe the * output format. + * @type \Google\Cloud\AIPlatform\V1\ExportFractionSplit $fraction_split + * Split based on fractions defining the size of each set. * @type string $annotations_filter * A filter on Annotations of the Dataset. Only Annotations on to-be-exported * DataItems(specified by [data_items_filter][]) that match this filter will @@ -102,6 +105,37 @@ public function setGcsDestination($var) return $this; } + /** + * Split based on fractions defining the size of each set. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExportFractionSplit fraction_split = 5; + * @return \Google\Cloud\AIPlatform\V1\ExportFractionSplit|null + */ + public function getFractionSplit() + { + return $this->readOneof(5); + } + + public function hasFractionSplit() + { + return $this->hasOneof(5); + } + + /** + * Split based on fractions defining the size of each set. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExportFractionSplit fraction_split = 5; + * @param \Google\Cloud\AIPlatform\V1\ExportFractionSplit $var + * @return $this + */ + public function setFractionSplit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ExportFractionSplit::class); + $this->writeOneof(5, $var); + + return $this; + } + /** * A filter on Annotations of the Dataset. Only Annotations on to-be-exported * DataItems(specified by [data_items_filter][]) that match this filter will @@ -142,5 +176,13 @@ public function getDestination() return $this->whichOneof("destination"); } + /** + * @return string + */ + public function getSplit() + { + return $this->whichOneof("split"); + } + } diff --git a/AiPlatform/src/V1/ExportFractionSplit.php b/AiPlatform/src/V1/ExportFractionSplit.php new file mode 100644 index 000000000000..aab42d88c35e --- /dev/null +++ b/AiPlatform/src/V1/ExportFractionSplit.php @@ -0,0 +1,140 @@ +google.cloud.aiplatform.v1.ExportFractionSplit + */ +class ExportFractionSplit extends \Google\Protobuf\Internal\Message +{ + /** + * The fraction of the input data that is to be used to train the Model. + * + * Generated from protobuf field double training_fraction = 1; + */ + private $training_fraction = 0.0; + /** + * The fraction of the input data that is to be used to validate the Model. + * + * Generated from protobuf field double validation_fraction = 2; + */ + private $validation_fraction = 0.0; + /** + * The fraction of the input data that is to be used to evaluate the Model. + * + * Generated from protobuf field double test_fraction = 3; + */ + private $test_fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $training_fraction + * The fraction of the input data that is to be used to train the Model. + * @type float $validation_fraction + * The fraction of the input data that is to be used to validate the Model. + * @type float $test_fraction + * The fraction of the input data that is to be used to evaluate the Model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Dataset::initOnce(); + parent::__construct($data); + } + + /** + * The fraction of the input data that is to be used to train the Model. + * + * Generated from protobuf field double training_fraction = 1; + * @return float + */ + public function getTrainingFraction() + { + return $this->training_fraction; + } + + /** + * The fraction of the input data that is to be used to train the Model. + * + * Generated from protobuf field double training_fraction = 1; + * @param float $var + * @return $this + */ + public function setTrainingFraction($var) + { + GPBUtil::checkDouble($var); + $this->training_fraction = $var; + + return $this; + } + + /** + * The fraction of the input data that is to be used to validate the Model. + * + * Generated from protobuf field double validation_fraction = 2; + * @return float + */ + public function getValidationFraction() + { + return $this->validation_fraction; + } + + /** + * The fraction of the input data that is to be used to validate the Model. + * + * Generated from protobuf field double validation_fraction = 2; + * @param float $var + * @return $this + */ + public function setValidationFraction($var) + { + GPBUtil::checkDouble($var); + $this->validation_fraction = $var; + + return $this; + } + + /** + * The fraction of the input data that is to be used to evaluate the Model. + * + * Generated from protobuf field double test_fraction = 3; + * @return float + */ + public function getTestFraction() + { + return $this->test_fraction; + } + + /** + * The fraction of the input data that is to be used to evaluate the Model. + * + * Generated from protobuf field double test_fraction = 3; + * @param float $var + * @return $this + */ + public function setTestFraction($var) + { + GPBUtil::checkDouble($var); + $this->test_fraction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Featurestore/OnlineServingConfig/Scaling.php b/AiPlatform/src/V1/Featurestore/OnlineServingConfig/Scaling.php index 982678b336e9..7f722ed97436 100644 --- a/AiPlatform/src/V1/Featurestore/OnlineServingConfig/Scaling.php +++ b/AiPlatform/src/V1/Featurestore/OnlineServingConfig/Scaling.php @@ -31,6 +31,18 @@ class Scaling extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 max_node_count = 2; */ private $max_node_count = 0; + /** + * Optional. The cpu utilization that the Autoscaler should be trying to + * achieve. This number is on a scale from 0 (no utilization) to 100 + * (total utilization), and is limited between 10 and 80. When a cluster's + * CPU utilization exceeds the target that you have set, Bigtable + * immediately adds nodes to the cluster. When CPU utilization is + * substantially lower than the target, Bigtable removes nodes. If not set + * or set to 0, default to 50. + * + * Generated from protobuf field int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cpu_utilization_target = 0; /** * Constructor. @@ -44,6 +56,14 @@ class Scaling extends \Google\Protobuf\Internal\Message * @type int $max_node_count * The maximum number of nodes to scale up to. Must be greater than * min_node_count, and less than or equal to 10 times of 'min_node_count'. + * @type int $cpu_utilization_target + * Optional. The cpu utilization that the Autoscaler should be trying to + * achieve. This number is on a scale from 0 (no utilization) to 100 + * (total utilization), and is limited between 10 and 80. When a cluster's + * CPU utilization exceeds the target that you have set, Bigtable + * immediately adds nodes to the cluster. When CPU utilization is + * substantially lower than the target, Bigtable removes nodes. If not set + * or set to 0, default to 50. * } */ public function __construct($data = NULL) { @@ -107,6 +127,44 @@ public function setMaxNodeCount($var) return $this; } + /** + * Optional. The cpu utilization that the Autoscaler should be trying to + * achieve. This number is on a scale from 0 (no utilization) to 100 + * (total utilization), and is limited between 10 and 80. When a cluster's + * CPU utilization exceeds the target that you have set, Bigtable + * immediately adds nodes to the cluster. When CPU utilization is + * substantially lower than the target, Bigtable removes nodes. If not set + * or set to 0, default to 50. + * + * Generated from protobuf field int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCpuUtilizationTarget() + { + return $this->cpu_utilization_target; + } + + /** + * Optional. The cpu utilization that the Autoscaler should be trying to + * achieve. This number is on a scale from 0 (no utilization) to 100 + * (total utilization), and is limited between 10 and 80. When a cluster's + * CPU utilization exceeds the target that you have set, Bigtable + * immediately adds nodes to the cluster. When CPU utilization is + * substantially lower than the target, Bigtable removes nodes. If not set + * or set to 0, default to 50. + * + * Generated from protobuf field int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCpuUtilizationTarget($var) + { + GPBUtil::checkInt32($var); + $this->cpu_utilization_target = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis.php b/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis.php index d76d50133615..9e36fd08e698 100644 --- a/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis.php +++ b/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis.php @@ -11,7 +11,9 @@ /** * Configuration of the Featurestore's ImportFeature Analysis Based * Monitoring. This type of analysis generates statistics for values of each - * Feature imported by every [ImportFeatureValues][] operation. + * Feature imported by every + * [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues] + * operation. * * Generated from protobuf message google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis */ diff --git a/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis/Baseline.php b/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis/Baseline.php index 54b43ec8b024..4d060022b81c 100644 --- a/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis/Baseline.php +++ b/AiPlatform/src/V1/FeaturestoreMonitoringConfig/ImportFeaturesAnalysis/Baseline.php @@ -8,7 +8,9 @@ /** * Defines the baseline to do anomaly detection for feature values imported - * by each [ImportFeatureValues][] operation. + * by each + * [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues] + * operation. * * Protobuf type google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis.Baseline */ diff --git a/AiPlatform/src/V1/FeaturestoreMonitoringConfig/SnapshotAnalysis.php b/AiPlatform/src/V1/FeaturestoreMonitoringConfig/SnapshotAnalysis.php index dd5453907aee..42230a0fc2d3 100644 --- a/AiPlatform/src/V1/FeaturestoreMonitoringConfig/SnapshotAnalysis.php +++ b/AiPlatform/src/V1/FeaturestoreMonitoringConfig/SnapshotAnalysis.php @@ -37,12 +37,6 @@ class SnapshotAnalysis extends \Google\Protobuf\Internal\Message /** * Configuration of the snapshot analysis based monitoring pipeline * running interval. The value indicates number of days. - * If both - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] - * are set when creating/updating EntityTypes/Features, - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * will be used. * * Generated from protobuf field int32 monitoring_interval_days = 3; */ @@ -77,12 +71,6 @@ class SnapshotAnalysis extends \Google\Protobuf\Internal\Message * @type int $monitoring_interval_days * Configuration of the snapshot analysis based monitoring pipeline * running interval. The value indicates number of days. - * If both - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] - * are set when creating/updating EntityTypes/Features, - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * will be used. * @type int $staleness_days * Customized export features time window for snapshot analysis. Unit is one * day. Default value is 3 weeks. Minimum value is 1 day. Maximum value is @@ -143,12 +131,6 @@ public function setDisabled($var) /** * Configuration of the snapshot analysis based monitoring pipeline * running interval. The value indicates number of days. - * If both - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] - * are set when creating/updating EntityTypes/Features, - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * will be used. * * Generated from protobuf field int32 monitoring_interval_days = 3; * @return int @@ -161,12 +143,6 @@ public function getMonitoringIntervalDays() /** * Configuration of the snapshot analysis based monitoring pipeline * running interval. The value indicates number of days. - * If both - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] - * are set when creating/updating EntityTypes/Features, - * [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - * will be used. * * Generated from protobuf field int32 monitoring_interval_days = 3; * @param int $var diff --git a/AiPlatform/src/V1/FeaturestoreServiceGrpcClient.php b/AiPlatform/src/V1/FeaturestoreServiceGrpcClient.php index d4b4f06b7499..2daf7d1f315b 100644 --- a/AiPlatform/src/V1/FeaturestoreServiceGrpcClient.php +++ b/AiPlatform/src/V1/FeaturestoreServiceGrpcClient.php @@ -343,6 +343,30 @@ public function ExportFeatureValues(\Google\Cloud\AIPlatform\V1\ExportFeatureVal $metadata, $options); } + /** + * Delete Feature values from Featurestore. + * + * The progress of the deletion is tracked by the returned operation. The + * deleted feature values are guaranteed to be invisible to subsequent read + * operations after the operation is marked as successfully done. + * + * If a delete feature values operation fails, the feature values + * returned from reads and exports may be inconsistent. If consistency is + * required, the caller must retry the same delete request again and wait till + * the new operation returned is marked as successfully done. + * @param \Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteFeatureValues(\Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.aiplatform.v1.FeaturestoreService/DeleteFeatureValues', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + /** * Searches Features matching a query in a given project. * @param \Google\Cloud\AIPlatform\V1\SearchFeaturesRequest $argument input argument diff --git a/AiPlatform/src/V1/Gapic/FeaturestoreServiceGapicClient.php b/AiPlatform/src/V1/Gapic/FeaturestoreServiceGapicClient.php index 04663ed923ab..fabbce710f5d 100644 --- a/AiPlatform/src/V1/Gapic/FeaturestoreServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/FeaturestoreServiceGapicClient.php @@ -48,6 +48,9 @@ use Google\Cloud\AIPlatform\V1\CsvSource; use Google\Cloud\AIPlatform\V1\DeleteEntityTypeRequest; use Google\Cloud\AIPlatform\V1\DeleteFeatureRequest; +use Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest; +use Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectEntity; +use Google\Cloud\AIPlatform\V1\DeleteFeatureValuesRequest\SelectTimeRangeAndFeature; use Google\Cloud\AIPlatform\V1\DeleteFeaturestoreRequest; use Google\Cloud\AIPlatform\V1\DestinationFeatureSetting; use Google\Cloud\AIPlatform\V1\EntityType; @@ -1151,6 +1154,105 @@ public function deleteFeature($name, array $optionalArgs = []) )->wait(); } + /** + * Delete Feature values from Featurestore. + * + * The progress of the deletion is tracked by the returned operation. The + * deleted feature values are guaranteed to be invisible to subsequent read + * operations after the operation is marked as successfully done. + * + * If a delete feature values operation fails, the feature values + * returned from reads and exports may be inconsistent. If consistency is + * required, the caller must retry the same delete request again and wait till + * the new operation returned is marked as successfully done. + * + * Sample code: + * ``` + * $featurestoreServiceClient = new FeaturestoreServiceClient(); + * try { + * $formattedEntityType = $featurestoreServiceClient->entityTypeName('[PROJECT]', '[LOCATION]', '[FEATURESTORE]', '[ENTITY_TYPE]'); + * $operationResponse = $featurestoreServiceClient->deleteFeatureValues($formattedEntityType); + * $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 = $featurestoreServiceClient->deleteFeatureValues($formattedEntityType); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $featurestoreServiceClient->resumeOperation($operationName, 'deleteFeatureValues'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $featurestoreServiceClient->close(); + * } + * ``` + * + * @param string $entityType Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * @param array $optionalArgs { + * Optional. + * + * @type SelectEntity $selectEntity + * Select feature values to be deleted by specifying entities. + * @type SelectTimeRangeAndFeature $selectTimeRangeAndFeature + * Select feature values to be deleted by specifying time range and + * features. + * @type RetrySettings|array $retrySettings + * Retry 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 deleteFeatureValues($entityType, array $optionalArgs = []) + { + $request = new DeleteFeatureValuesRequest(); + $requestParamHeaders = []; + $request->setEntityType($entityType); + $requestParamHeaders['entity_type'] = $entityType; + if (isset($optionalArgs['selectEntity'])) { + $request->setSelectEntity($optionalArgs['selectEntity']); + } + + if (isset($optionalArgs['selectTimeRangeAndFeature'])) { + $request->setSelectTimeRangeAndFeature( + $optionalArgs['selectTimeRangeAndFeature'] + ); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'DeleteFeatureValues', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + /** * Deletes a single Featurestore. The Featurestore must not contain any * EntityTypes or `force` must be set to true for the request to succeed. diff --git a/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php b/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php index 10f3ee4ab15c..fffe477ccca0 100644 --- a/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php @@ -36,12 +36,15 @@ use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; +use Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsRequest; +use Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsResponse; use Google\Cloud\AIPlatform\V1\BatchImportModelEvaluationSlicesRequest; use Google\Cloud\AIPlatform\V1\BatchImportModelEvaluationSlicesResponse; use Google\Cloud\AIPlatform\V1\CopyModelRequest; use Google\Cloud\AIPlatform\V1\DeleteModelRequest; use Google\Cloud\AIPlatform\V1\DeleteModelVersionRequest; use Google\Cloud\AIPlatform\V1\EncryptionSpec; +use Google\Cloud\AIPlatform\V1\EvaluatedAnnotation; use Google\Cloud\AIPlatform\V1\ExportModelRequest; use Google\Cloud\AIPlatform\V1\ExportModelRequest\OutputConfig; use Google\Cloud\AIPlatform\V1\GetModelEvaluationRequest; @@ -84,9 +87,9 @@ * ``` * $modelServiceClient = new ModelServiceClient(); * try { - * $formattedParent = $modelServiceClient->modelEvaluationName('[PROJECT]', '[LOCATION]', '[MODEL]', '[EVALUATION]'); - * $modelEvaluationSlices = []; - * $response = $modelServiceClient->batchImportModelEvaluationSlices($formattedParent, $modelEvaluationSlices); + * $formattedParent = $modelServiceClient->modelEvaluationSliceName('[PROJECT]', '[LOCATION]', '[MODEL]', '[EVALUATION]', '[SLICE]'); + * $evaluatedAnnotations = []; + * $response = $modelServiceClient->batchImportEvaluatedAnnotations($formattedParent, $evaluatedAnnotations); * } finally { * $modelServiceClient->close(); * } @@ -483,6 +486,62 @@ public function __construct(array $options = []) $this->operationsClient = $this->createOperationsClient($clientOptions); } + /** + * Imports a list of externally generated EvaluatedAnnotations. + * + * Sample code: + * ``` + * $modelServiceClient = new ModelServiceClient(); + * try { + * $formattedParent = $modelServiceClient->modelEvaluationSliceName('[PROJECT]', '[LOCATION]', '[MODEL]', '[EVALUATION]', '[SLICE]'); + * $evaluatedAnnotations = []; + * $response = $modelServiceClient->batchImportEvaluatedAnnotations($formattedParent, $evaluatedAnnotations); + * } finally { + * $modelServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * @param EvaluatedAnnotation[] $evaluatedAnnotations Required. Evaluated annotations resource to be imported. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsResponse + * + * @throws ApiException if the remote call fails + */ + public function batchImportEvaluatedAnnotations( + $parent, + $evaluatedAnnotations, + array $optionalArgs = [] + ) { + $request = new BatchImportEvaluatedAnnotationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEvaluatedAnnotations($evaluatedAnnotations); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'BatchImportEvaluatedAnnotations', + BatchImportEvaluatedAnnotationsResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Imports a list of externally generated ModelEvaluationSlice. * @@ -730,8 +789,9 @@ public function deleteModel($name, array $optionalArgs = []) /** * Deletes a Model version. * - * Model version can only be deleted if there are no [DeployedModels][] - * created from it. Deleting the only version in the Model is not allowed. Use + * Model version can only be deleted if there are no + * [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. + * Deleting the only version in the Model is not allowed. Use * [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for * deleting the Model instead. * diff --git a/AiPlatform/src/V1/Gapic/VizierServiceGapicClient.php b/AiPlatform/src/V1/Gapic/VizierServiceGapicClient.php index 181014fac448..3e83694f9f29 100644 --- a/AiPlatform/src/V1/Gapic/VizierServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/VizierServiceGapicClient.php @@ -496,7 +496,7 @@ public function addTrialMeasurement( * Checks whether a Trial should stop or not. Returns a * long-running operation. When the operation is successful, * it will contain a - * [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse]. + * [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse]. * * Sample code: * ``` diff --git a/AiPlatform/src/V1/JobState.php b/AiPlatform/src/V1/JobState.php index c758cd718d28..7889c8a52da1 100644 --- a/AiPlatform/src/V1/JobState.php +++ b/AiPlatform/src/V1/JobState.php @@ -75,11 +75,8 @@ class JobState */ const JOB_STATE_EXPIRED = 9; /** - * The job is being updated. The job is only able to be updated at RUNNING - * state; if the update operation succeeds, job goes back to RUNNING state; if - * the update operation fails, the job goes back to RUNNING state with error - * messages written to [ModelDeploymentMonitoringJob.partial_errors][] field - * if it is a ModelDeploymentMonitoringJob. + * The job is being updated. Only jobs in the `RUNNING` state can be updated. + * After updating, the job goes back to the `RUNNING` state. * * Generated from protobuf enum JOB_STATE_UPDATING = 10; */ diff --git a/AiPlatform/src/V1/Model.php b/AiPlatform/src/V1/Model.php index 80430bab0f45..0cf811191c65 100644 --- a/AiPlatform/src/V1/Model.php +++ b/AiPlatform/src/V1/Model.php @@ -129,14 +129,14 @@ class Model extends \Google\Protobuf\Internal\Message * deploying this Model. The specification is ingested upon * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], * and all binaries it contains are copied and stored internally by Vertex AI. - * Not present for AutoML Models. + * Not present for AutoML Models or Large Models. * * Generated from protobuf field .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; */ private $container_spec = null; /** * Immutable. The path to the directory containing the Model artifact and any - * of its supporting files. Not present for AutoML Models. + * of its supporting files. Not present for AutoML Models or Large Models. * * Generated from protobuf field string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; */ @@ -263,11 +263,13 @@ class Model extends \Google\Protobuf\Internal\Message private $deployed_models; /** * The default explanation specification for this Model. - * The Model can be used for [requesting - * explanation][PredictionService.Explain] after being - * [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if it is - * populated. The Model can be used for [batch - * explanation][BatchPredictionJob.generate_explanation] if it is populated. + * The Model can be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] after + * being [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if + * it is populated. The Model can be used for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * if it is populated. * All fields of the explanation_spec can be overridden by * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of @@ -276,13 +278,16 @@ class Model extends \Google\Protobuf\Internal\Message * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * If the default explanation specification is not set for this Model, this - * Model can still be used for [requesting - * explanation][PredictionService.Explain] by setting + * Model can still be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] by + * setting * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of * [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model] - * and for [batch explanation][BatchPredictionJob.generate_explanation] by - * setting + * and for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * by setting * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * @@ -405,10 +410,10 @@ class Model extends \Google\Protobuf\Internal\Message * deploying this Model. The specification is ingested upon * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], * and all binaries it contains are copied and stored internally by Vertex AI. - * Not present for AutoML Models. + * Not present for AutoML Models or Large Models. * @type string $artifact_uri * Immutable. The path to the directory containing the Model artifact and any - * of its supporting files. Not present for AutoML Models. + * of its supporting files. Not present for AutoML Models or Large Models. * @type array|\Google\Protobuf\Internal\RepeatedField $supported_deployment_resources_types * Output only. When this Model is deployed, its prediction resources are * described by the `prediction_resources` field of the @@ -507,11 +512,13 @@ class Model extends \Google\Protobuf\Internal\Message * that Model could have been deployed to Endpoints in different Locations. * @type \Google\Cloud\AIPlatform\V1\ExplanationSpec $explanation_spec * The default explanation specification for this Model. - * The Model can be used for [requesting - * explanation][PredictionService.Explain] after being - * [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if it is - * populated. The Model can be used for [batch - * explanation][BatchPredictionJob.generate_explanation] if it is populated. + * The Model can be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] after + * being [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if + * it is populated. The Model can be used for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * if it is populated. * All fields of the explanation_spec can be overridden by * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of @@ -520,13 +527,16 @@ class Model extends \Google\Protobuf\Internal\Message * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * If the default explanation specification is not set for this Model, this - * Model can still be used for [requesting - * explanation][PredictionService.Explain] by setting + * Model can still be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] by + * setting * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of * [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model] - * and for [batch explanation][BatchPredictionJob.generate_explanation] by - * setting + * and for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * by setting * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * @type string $etag @@ -1004,7 +1014,7 @@ public function setTrainingPipeline($var) * deploying this Model. The specification is ingested upon * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], * and all binaries it contains are copied and stored internally by Vertex AI. - * Not present for AutoML Models. + * Not present for AutoML Models or Large Models. * * Generated from protobuf field .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; * @return \Google\Cloud\AIPlatform\V1\ModelContainerSpec|null @@ -1029,7 +1039,7 @@ public function clearContainerSpec() * deploying this Model. The specification is ingested upon * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], * and all binaries it contains are copied and stored internally by Vertex AI. - * Not present for AutoML Models. + * Not present for AutoML Models or Large Models. * * Generated from protobuf field .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; * @param \Google\Cloud\AIPlatform\V1\ModelContainerSpec $var @@ -1045,7 +1055,7 @@ public function setContainerSpec($var) /** * Immutable. The path to the directory containing the Model artifact and any - * of its supporting files. Not present for AutoML Models. + * of its supporting files. Not present for AutoML Models or Large Models. * * Generated from protobuf field string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; * @return string @@ -1057,7 +1067,7 @@ public function getArtifactUri() /** * Immutable. The path to the directory containing the Model artifact and any - * of its supporting files. Not present for AutoML Models. + * of its supporting files. Not present for AutoML Models or Large Models. * * Generated from protobuf field string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; * @param string $var @@ -1417,11 +1427,13 @@ public function setDeployedModels($var) /** * The default explanation specification for this Model. - * The Model can be used for [requesting - * explanation][PredictionService.Explain] after being - * [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if it is - * populated. The Model can be used for [batch - * explanation][BatchPredictionJob.generate_explanation] if it is populated. + * The Model can be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] after + * being [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if + * it is populated. The Model can be used for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * if it is populated. * All fields of the explanation_spec can be overridden by * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of @@ -1430,13 +1442,16 @@ public function setDeployedModels($var) * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * If the default explanation specification is not set for this Model, this - * Model can still be used for [requesting - * explanation][PredictionService.Explain] by setting + * Model can still be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] by + * setting * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of * [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model] - * and for [batch explanation][BatchPredictionJob.generate_explanation] by - * setting + * and for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * by setting * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * @@ -1460,11 +1475,13 @@ public function clearExplanationSpec() /** * The default explanation specification for this Model. - * The Model can be used for [requesting - * explanation][PredictionService.Explain] after being - * [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if it is - * populated. The Model can be used for [batch - * explanation][BatchPredictionJob.generate_explanation] if it is populated. + * The Model can be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] after + * being [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if + * it is populated. The Model can be used for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * if it is populated. * All fields of the explanation_spec can be overridden by * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of @@ -1473,13 +1490,16 @@ public function clearExplanationSpec() * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * If the default explanation specification is not set for this Model, this - * Model can still be used for [requesting - * explanation][PredictionService.Explain] by setting + * Model can still be used for + * [requesting + * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] by + * setting * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * of * [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model] - * and for [batch explanation][BatchPredictionJob.generate_explanation] by - * setting + * and for [batch + * explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + * by setting * [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] * of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. * diff --git a/AiPlatform/src/V1/ModelEvaluation.php b/AiPlatform/src/V1/ModelEvaluation.php index 1873dd081818..32a4a97d801f 100644 --- a/AiPlatform/src/V1/ModelEvaluation.php +++ b/AiPlatform/src/V1/ModelEvaluation.php @@ -62,8 +62,8 @@ class ModelEvaluation extends \Google\Protobuf\Internal\Message /** * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.data_item_payload][] and - * [EvaluatedAnnotation.data_item_payload][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -75,9 +75,10 @@ class ModelEvaluation extends \Google\Protobuf\Internal\Message * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.predictions][], * [EvaluatedDataItemView.ground_truths][], - * [EvaluatedAnnotation.predictions][], and - * [EvaluatedAnnotation.ground_truths][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * and + * [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -139,8 +140,8 @@ class ModelEvaluation extends \Google\Protobuf\Internal\Message * @type string $data_item_schema_uri * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.data_item_payload][] and - * [EvaluatedAnnotation.data_item_payload][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -148,9 +149,10 @@ class ModelEvaluation extends \Google\Protobuf\Internal\Message * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.predictions][], * [EvaluatedDataItemView.ground_truths][], - * [EvaluatedAnnotation.predictions][], and - * [EvaluatedAnnotation.ground_truths][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * and + * [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -367,8 +369,8 @@ public function setSliceDimensions($var) /** * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.data_item_payload][] and - * [EvaluatedAnnotation.data_item_payload][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -384,8 +386,8 @@ public function getDataItemSchemaUri() /** * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.data_item_payload][] and - * [EvaluatedAnnotation.data_item_payload][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -406,9 +408,10 @@ public function setDataItemSchemaUri($var) * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.predictions][], * [EvaluatedDataItemView.ground_truths][], - * [EvaluatedAnnotation.predictions][], and - * [EvaluatedAnnotation.ground_truths][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * and + * [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. @@ -425,9 +428,10 @@ public function getAnnotationSchemaUri() * Points to a YAML file stored on Google Cloud Storage describing * [EvaluatedDataItemView.predictions][], * [EvaluatedDataItemView.ground_truths][], - * [EvaluatedAnnotation.predictions][], and - * [EvaluatedAnnotation.ground_truths][]. The schema is defined as an - * OpenAPI 3.0.2 [Schema + * [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + * and + * [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + * The schema is defined as an OpenAPI 3.0.2 [Schema * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). * This field is not populated if there are neither EvaluatedDataItemViews nor * EvaluatedAnnotations under this ModelEvaluation. diff --git a/AiPlatform/src/V1/ModelEvaluationSlice.php b/AiPlatform/src/V1/ModelEvaluationSlice.php index 69aab3068d33..83bc3de76270 100644 --- a/AiPlatform/src/V1/ModelEvaluationSlice.php +++ b/AiPlatform/src/V1/ModelEvaluationSlice.php @@ -52,6 +52,15 @@ class ModelEvaluationSlice extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $create_time = null; + /** + * Output only. Aggregated explanation metrics for the Model's prediction + * output over the data this ModelEvaluation uses. This field is populated + * only if the Model is evaluated with explanations, and only for tabular + * Models. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelExplanation model_explanation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $model_explanation = null; /** * Constructor. @@ -75,6 +84,11 @@ class ModelEvaluationSlice extends \Google\Protobuf\Internal\Message * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri] * @type \Google\Protobuf\Timestamp $create_time * Output only. Timestamp when this ModelEvaluationSlice was created. + * @type \Google\Cloud\AIPlatform\V1\ModelExplanation $model_explanation + * Output only. Aggregated explanation metrics for the Model's prediction + * output over the data this ModelEvaluation uses. This field is populated + * only if the Model is evaluated with explanations, and only for tabular + * Models. * } */ public function __construct($data = NULL) { @@ -254,5 +268,47 @@ public function setCreateTime($var) return $this; } + /** + * Output only. Aggregated explanation metrics for the Model's prediction + * output over the data this ModelEvaluation uses. This field is populated + * only if the Model is evaluated with explanations, and only for tabular + * Models. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelExplanation model_explanation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\ModelExplanation|null + */ + public function getModelExplanation() + { + return $this->model_explanation; + } + + public function hasModelExplanation() + { + return isset($this->model_explanation); + } + + public function clearModelExplanation() + { + unset($this->model_explanation); + } + + /** + * Output only. Aggregated explanation metrics for the Model's prediction + * output over the data this ModelEvaluation uses. This field is populated + * only if the Model is evaluated with explanations, and only for tabular + * Models. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelExplanation model_explanation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\ModelExplanation $var + * @return $this + */ + public function setModelExplanation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelExplanation::class); + $this->model_explanation = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/ModelEvaluationSlice/Slice.php b/AiPlatform/src/V1/ModelEvaluationSlice/Slice.php index 9addfd64f09d..de9c85443908 100644 --- a/AiPlatform/src/V1/ModelEvaluationSlice/Slice.php +++ b/AiPlatform/src/V1/ModelEvaluationSlice/Slice.php @@ -23,6 +23,8 @@ class Slice extends \Google\Protobuf\Internal\Message * [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] * equals to * [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + * * `slice`: This slice is a user customized slice defined by its + * SliceSpec. * * Generated from protobuf field string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -33,6 +35,12 @@ class Slice extends \Google\Protobuf\Internal\Message * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $value = ''; + /** + * Output only. Specification for how the data was sliced. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec slice_spec = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $slice_spec = null; /** * Constructor. @@ -48,8 +56,12 @@ class Slice extends \Google\Protobuf\Internal\Message * [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] * equals to * [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + * * `slice`: This slice is a user customized slice defined by its + * SliceSpec. * @type string $value * Output only. The value of the dimension in this slice. + * @type \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec $slice_spec + * Output only. Specification for how the data was sliced. * } */ public function __construct($data = NULL) { @@ -65,6 +77,8 @@ public function __construct($data = NULL) { * [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] * equals to * [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + * * `slice`: This slice is a user customized slice defined by its + * SliceSpec. * * Generated from protobuf field string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -82,6 +96,8 @@ public function getDimension() * [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] * equals to * [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + * * `slice`: This slice is a user customized slice defined by its + * SliceSpec. * * Generated from protobuf field string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -121,6 +137,42 @@ public function setValue($var) return $this; } + /** + * Output only. Specification for how the data was sliced. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec slice_spec = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec|null + */ + public function getSliceSpec() + { + return $this->slice_spec; + } + + public function hasSliceSpec() + { + return isset($this->slice_spec); + } + + public function clearSliceSpec() + { + unset($this->slice_spec); + } + + /** + * Output only. Specification for how the data was sliced. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec slice_spec = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec $var + * @return $this + */ + public function setSliceSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec::class); + $this->slice_spec = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec.php b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec.php new file mode 100644 index 000000000000..da762adf4bdb --- /dev/null +++ b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec.php @@ -0,0 +1,80 @@ +google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + */ +class SliceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Mapping configuration for this SliceSpec. + * The key is the name of the feature. + * By default, the key will be prefixed by "instance" as a dictionary + * prefix for Vertex Batch Predictions output format. + * + * Generated from protobuf field map configs = 1; + */ + private $configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $configs + * Mapping configuration for this SliceSpec. + * The key is the name of the feature. + * By default, the key will be prefixed by "instance" as a dictionary + * prefix for Vertex Batch Predictions output format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelEvaluationSlice::initOnce(); + parent::__construct($data); + } + + /** + * Mapping configuration for this SliceSpec. + * The key is the name of the feature. + * By default, the key will be prefixed by "instance" as a dictionary + * prefix for Vertex Batch Predictions output format. + * + * Generated from protobuf field map configs = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getConfigs() + { + return $this->configs; + } + + /** + * Mapping configuration for this SliceSpec. + * The key is the name of the feature. + * By default, the key will be prefixed by "instance" as a dictionary + * prefix for Vertex Batch Predictions output format. + * + * Generated from protobuf field map configs = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\SliceConfig::class); + $this->configs = $arr; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/Range.php b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/Range.php new file mode 100644 index 000000000000..4bffbb63bb7a --- /dev/null +++ b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/Range.php @@ -0,0 +1,103 @@ +google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + */ +class Range extends \Google\Protobuf\Internal\Message +{ + /** + * Inclusive low value for the range. + * + * Generated from protobuf field float low = 1; + */ + private $low = 0.0; + /** + * Exclusive high value for the range. + * + * Generated from protobuf field float high = 2; + */ + private $high = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $low + * Inclusive low value for the range. + * @type float $high + * Exclusive high value for the range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelEvaluationSlice::initOnce(); + parent::__construct($data); + } + + /** + * Inclusive low value for the range. + * + * Generated from protobuf field float low = 1; + * @return float + */ + public function getLow() + { + return $this->low; + } + + /** + * Inclusive low value for the range. + * + * Generated from protobuf field float low = 1; + * @param float $var + * @return $this + */ + public function setLow($var) + { + GPBUtil::checkFloat($var); + $this->low = $var; + + return $this; + } + + /** + * Exclusive high value for the range. + * + * Generated from protobuf field float high = 2; + * @return float + */ + public function getHigh() + { + return $this->high; + } + + /** + * Exclusive high value for the range. + * + * Generated from protobuf field float high = 2; + * @param float $var + * @return $this + */ + public function setHigh($var) + { + GPBUtil::checkFloat($var); + $this->high = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/SliceConfig.php b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/SliceConfig.php new file mode 100644 index 000000000000..378208b5648f --- /dev/null +++ b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/SliceConfig.php @@ -0,0 +1,227 @@ +google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + */ +class SliceConfig extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Value $value + * A unique specific value for a given feature. + * Example: `{ "value": { "string_value": "12345" } }` + * @type \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Range $range + * A range of values for a numerical feature. + * Example: `{"range":{"low":10000.0,"high":50000.0}}` + * will capture 12345 and 23334 in the slice. + * @type \Google\Protobuf\BoolValue $all_values + * If all_values is set to true, then all possible labels of the keyed + * feature will have another slice computed. + * Example: `{"all_values":{"value":true}}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelEvaluationSlice::initOnce(); + parent::__construct($data); + } + + /** + * A unique specific value for a given feature. + * Example: `{ "value": { "string_value": "12345" } }` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value value = 1; + * @return \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Value|null + */ + public function getValue() + { + return $this->readOneof(1); + } + + public function hasValue() + { + return $this->hasOneof(1); + } + + /** + * A unique specific value for a given feature. + * Example: `{ "value": { "string_value": "12345" } }` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value value = 1; + * @param \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Value::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A range of values for a numerical feature. + * Example: `{"range":{"low":10000.0,"high":50000.0}}` + * will capture 12345 and 23334 in the slice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range range = 2; + * @return \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Range|null + */ + public function getRange() + { + return $this->readOneof(2); + } + + public function hasRange() + { + return $this->hasOneof(2); + } + + /** + * A range of values for a numerical feature. + * Example: `{"range":{"low":10000.0,"high":50000.0}}` + * will capture 12345 and 23334 in the slice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range range = 2; + * @param \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Range $var + * @return $this + */ + public function setRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec\Range::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If all_values is set to true, then all possible labels of the keyed + * feature will have another slice computed. + * Example: `{"all_values":{"value":true}}` + * + * Generated from protobuf field .google.protobuf.BoolValue all_values = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getAllValues() + { + return $this->readOneof(3); + } + + public function hasAllValues() + { + return $this->hasOneof(3); + } + + /** + * Returns the unboxed value from getAllValues() + + * If all_values is set to true, then all possible labels of the keyed + * feature will have another slice computed. + * Example: `{"all_values":{"value":true}}` + * + * Generated from protobuf field .google.protobuf.BoolValue all_values = 3; + * @return bool|null + */ + public function getAllValuesValue() + { + return $this->readWrapperValue("all_values"); + } + + /** + * If all_values is set to true, then all possible labels of the keyed + * feature will have another slice computed. + * Example: `{"all_values":{"value":true}}` + * + * Generated from protobuf field .google.protobuf.BoolValue all_values = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setAllValues($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * If all_values is set to true, then all possible labels of the keyed + * feature will have another slice computed. + * Example: `{"all_values":{"value":true}}` + * + * Generated from protobuf field .google.protobuf.BoolValue all_values = 3; + * @param bool|null $var + * @return $this + */ + public function setAllValuesValue($var) + { + $this->writeWrapperValue("all_values", $var); + return $this;} + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + + diff --git a/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/Value.php b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/Value.php new file mode 100644 index 000000000000..c889f526b978 --- /dev/null +++ b/AiPlatform/src/V1/ModelEvaluationSlice/Slice/SliceSpec/Value.php @@ -0,0 +1,109 @@ +google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $string_value + * String type. + * @type float $float_value + * Float type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelEvaluationSlice::initOnce(); + parent::__construct($data); + } + + /** + * String type. + * + * Generated from protobuf field string string_value = 1; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(1); + } + + public function hasStringValue() + { + return $this->hasOneof(1); + } + + /** + * String type. + * + * Generated from protobuf field string string_value = 1; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Float type. + * + * Generated from protobuf field float float_value = 2; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(2); + } + + public function hasFloatValue() + { + return $this->hasOneof(2); + } + + /** + * Float type. + * + * Generated from protobuf field float float_value = 2; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + + diff --git a/AiPlatform/src/V1/ModelServiceGrpcClient.php b/AiPlatform/src/V1/ModelServiceGrpcClient.php index f021a903c1da..377d633ffa2c 100644 --- a/AiPlatform/src/V1/ModelServiceGrpcClient.php +++ b/AiPlatform/src/V1/ModelServiceGrpcClient.php @@ -132,8 +132,9 @@ public function DeleteModel(\Google\Cloud\AIPlatform\V1\DeleteModelRequest $argu /** * Deletes a Model version. * - * Model version can only be deleted if there are no [DeployedModels][] - * created from it. Deleting the only version in the Model is not allowed. Use + * Model version can only be deleted if there are no + * [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. + * Deleting the only version in the Model is not allowed. Use * [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for * deleting the Model instead. * @param \Google\Cloud\AIPlatform\V1\DeleteModelVersionRequest $argument input argument @@ -232,6 +233,21 @@ public function BatchImportModelEvaluationSlices(\Google\Cloud\AIPlatform\V1\Bat $metadata, $options); } + /** + * Imports a list of externally generated EvaluatedAnnotations. + * @param \Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchImportEvaluatedAnnotations(\Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.aiplatform.v1.ModelService/BatchImportEvaluatedAnnotations', + $argument, + ['\Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsResponse', 'decode'], + $metadata, $options); + } + /** * Gets a ModelEvaluation. * @param \Google\Cloud\AIPlatform\V1\GetModelEvaluationRequest $argument input argument diff --git a/AiPlatform/src/V1/NasJob.php b/AiPlatform/src/V1/NasJob.php index 0f6e9a243a47..8d066f83b5e0 100644 --- a/AiPlatform/src/V1/NasJob.php +++ b/AiPlatform/src/V1/NasJob.php @@ -102,9 +102,10 @@ class NasJob extends \Google\Protobuf\Internal\Message * Optional. Enable a separation of Custom model training * and restricted image training for tenant project. * - * Generated from protobuf field bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field bool enable_restricted_image_training = 14 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated */ - private $enable_restricted_image_training = false; + protected $enable_restricted_image_training = false; /** * Constructor. @@ -575,11 +576,13 @@ public function setEncryptionSpec($var) * Optional. Enable a separation of Custom model training * and restricted image training for tenant project. * - * Generated from protobuf field bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field bool enable_restricted_image_training = 14 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @return bool + * @deprecated */ public function getEnableRestrictedImageTraining() { + @trigger_error('enable_restricted_image_training is deprecated.', E_USER_DEPRECATED); return $this->enable_restricted_image_training; } @@ -587,12 +590,14 @@ public function getEnableRestrictedImageTraining() * Optional. Enable a separation of Custom model training * and restricted image training for tenant project. * - * Generated from protobuf field bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field bool enable_restricted_image_training = 14 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this + * @deprecated */ public function setEnableRestrictedImageTraining($var) { + @trigger_error('enable_restricted_image_training is deprecated.', E_USER_DEPRECATED); GPBUtil::checkBool($var); $this->enable_restricted_image_training = $var; diff --git a/AiPlatform/src/V1/ReadTensorboardUsageResponse.php b/AiPlatform/src/V1/ReadTensorboardUsageResponse.php index b6e19fd5dd65..df6f559c8b79 100644 --- a/AiPlatform/src/V1/ReadTensorboardUsageResponse.php +++ b/AiPlatform/src/V1/ReadTensorboardUsageResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [TensorboardService.GetTensorboardUsage][]. + * Response message for + * [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]. * * Generated from protobuf message google.cloud.aiplatform.v1.ReadTensorboardUsageResponse */ diff --git a/AiPlatform/src/V1/VizierServiceGrpcClient.php b/AiPlatform/src/V1/VizierServiceGrpcClient.php index 8689a45394f3..da0156db99f4 100644 --- a/AiPlatform/src/V1/VizierServiceGrpcClient.php +++ b/AiPlatform/src/V1/VizierServiceGrpcClient.php @@ -227,7 +227,7 @@ public function DeleteTrial(\Google\Cloud\AIPlatform\V1\DeleteTrialRequest $argu * Checks whether a Trial should stop or not. Returns a * long-running operation. When the operation is successful, * it will contain a - * [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse]. + * [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse]. * @param \Google\Cloud\AIPlatform\V1\CheckTrialEarlyStoppingStateRequest $argument input argument * @param array $metadata metadata * @param array $options call options diff --git a/AiPlatform/src/V1/gapic_metadata.json b/AiPlatform/src/V1/gapic_metadata.json index e0a7a4586c68..17ecadf7dae4 100644 --- a/AiPlatform/src/V1/gapic_metadata.json +++ b/AiPlatform/src/V1/gapic_metadata.json @@ -257,6 +257,11 @@ "deleteFeature" ] }, + "DeleteFeatureValues": { + "methods": [ + "deleteFeatureValues" + ] + }, "DeleteFeaturestore": { "methods": [ "deleteFeaturestore" @@ -946,6 +951,11 @@ "grpc": { "libraryClient": "ModelServiceGapicClient", "rpcs": { + "BatchImportEvaluatedAnnotations": { + "methods": [ + "batchImportEvaluatedAnnotations" + ] + }, "BatchImportModelEvaluationSlices": { "methods": [ "batchImportModelEvaluationSlices" 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 3da9071e8957..f59556e667a8 100644 --- a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php @@ -362,6 +362,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -607,6 +611,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -856,6 +864,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1101,6 +1113,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1346,6 +1362,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 90e10380bcdb..a2afd8c6c113 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php @@ -307,6 +307,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -552,6 +556,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -801,6 +809,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1046,6 +1058,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1291,6 +1307,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 89c4ed0e9e2d..deed492f7019 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 @@ -258,6 +258,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -503,6 +507,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -752,6 +760,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -997,6 +1009,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1242,6 +1258,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/featurestore_service_client_config.json b/AiPlatform/src/V1/resources/featurestore_service_client_config.json index 10dbc8a8d6a4..e05a957c2ef6 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_client_config.json +++ b/AiPlatform/src/V1/resources/featurestore_service_client_config.json @@ -51,6 +51,11 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "DeleteFeatureValues": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "DeleteFeaturestore": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", diff --git a/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php b/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php index cb8aacb4acf3..5c103dd58e94 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php @@ -73,6 +73,16 @@ 'totalPollTimeoutMillis' => '300000', ], ], + 'DeleteFeatureValues' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteFeatureValuesOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], 'DeleteFeaturestore' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', 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 6d9cf43dd5ca..e518135100b6 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php @@ -94,6 +94,18 @@ ], ], ], + 'DeleteFeatureValues' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues', + 'body' => '*', + 'placeholders' => [ + 'entity_type' => [ + 'getters' => [ + 'getEntityType', + ], + ], + ], + ], 'DeleteFeaturestore' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*}', @@ -464,6 +476,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -709,6 +725,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -958,6 +978,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1203,6 +1227,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1448,6 +1476,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 d07d829fa619..75385031482d 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 @@ -319,6 +319,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -564,6 +568,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -813,6 +821,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1058,6 +1070,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1303,6 +1319,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 db5495b09dab..49097190ac3b 100644 --- a/AiPlatform/src/V1/resources/index_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_service_rest_client_config.php @@ -304,6 +304,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -549,6 +553,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -798,6 +806,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1043,6 +1055,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1288,6 +1304,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 e2a79b12096e..8c03e8d70fbe 100644 --- a/AiPlatform/src/V1/resources/job_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/job_service_rest_client_config.php @@ -626,6 +626,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -871,6 +875,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1120,6 +1128,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1365,6 +1377,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1610,6 +1626,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 c513ca048734..262a294d7ee8 100644 --- a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php @@ -592,6 +592,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -837,6 +841,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1086,6 +1094,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1331,6 +1343,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1576,6 +1592,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 c14310c00e0a..260768914498 100644 --- a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php @@ -246,6 +246,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -491,6 +495,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -740,6 +748,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -985,6 +997,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1230,6 +1246,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/model_service_client_config.json b/AiPlatform/src/V1/resources/model_service_client_config.json index 1013fcf1ef54..71bcc3541bde 100644 --- a/AiPlatform/src/V1/resources/model_service_client_config.json +++ b/AiPlatform/src/V1/resources/model_service_client_config.json @@ -16,6 +16,11 @@ } }, "methods": { + "BatchImportEvaluatedAnnotations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "BatchImportModelEvaluationSlices": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", 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 8ff7906907b3..d4202b7e9ec2 100644 --- a/AiPlatform/src/V1/resources/model_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_service_rest_client_config.php @@ -3,6 +3,18 @@ return [ 'interfaces' => [ 'google.cloud.aiplatform.v1.ModelService' => [ + 'BatchImportEvaluatedAnnotations' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'BatchImportModelEvaluationSlices' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport', @@ -409,6 +421,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -654,6 +670,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -903,6 +923,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1148,6 +1172,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1393,6 +1421,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 7d90ed5520ad..cdc8cd854dbd 100644 --- a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php @@ -336,6 +336,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -581,6 +585,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -830,6 +838,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1075,6 +1087,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1320,6 +1336,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 22f14fc55671..758eb4342e81 100644 --- a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php @@ -258,6 +258,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -503,6 +507,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -752,6 +760,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -997,6 +1009,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1242,6 +1258,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 d37b9ee3a457..1673caeff98d 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 @@ -283,6 +283,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -528,6 +532,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -777,6 +785,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1022,6 +1034,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1267,6 +1283,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 13d11333b070..207cc412a911 100644 --- a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php @@ -576,6 +576,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -821,6 +825,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1070,6 +1078,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1315,6 +1327,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1560,6 +1576,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', 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 0321c12858b6..94ffb22bfe31 100644 --- a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php @@ -396,6 +396,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', @@ -641,6 +645,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -890,6 +898,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1135,6 +1147,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', @@ -1380,6 +1396,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', diff --git a/AiPlatform/tests/Unit/V1/FeaturestoreServiceClientTest.php b/AiPlatform/tests/Unit/V1/FeaturestoreServiceClientTest.php index ace9fb511815..94bb4bb2c596 100644 --- a/AiPlatform/tests/Unit/V1/FeaturestoreServiceClientTest.php +++ b/AiPlatform/tests/Unit/V1/FeaturestoreServiceClientTest.php @@ -29,6 +29,7 @@ use Google\ApiCore\Testing\MockTransport; use Google\Cloud\AIPlatform\V1\BatchCreateFeaturesResponse; use Google\Cloud\AIPlatform\V1\BatchReadFeatureValuesResponse; +use Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse; use Google\Cloud\AIPlatform\V1\EntityType; use Google\Cloud\AIPlatform\V1\ExportFeatureValuesResponse; use Google\Cloud\AIPlatform\V1\Feature; @@ -955,6 +956,123 @@ public function deleteFeatureExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function deleteFeatureValuesTest() + { + $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/deleteFeatureValuesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DeleteFeatureValuesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFeatureValuesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedEntityType = $gapicClient->entityTypeName('[PROJECT]', '[LOCATION]', '[FEATURESTORE]', '[ENTITY_TYPE]'); + $response = $gapicClient->deleteFeatureValues($formattedEntityType); + $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.FeaturestoreService/DeleteFeatureValues', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEntityType(); + $this->assertProtobufEquals($formattedEntityType, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFeatureValuesTest'); + $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 deleteFeatureValuesExceptionTest() + { + $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/deleteFeatureValuesTest'); + $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 + $formattedEntityType = $gapicClient->entityTypeName('[PROJECT]', '[LOCATION]', '[FEATURESTORE]', '[ENTITY_TYPE]'); + $response = $gapicClient->deleteFeatureValues($formattedEntityType); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFeatureValuesTest'); + 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 deleteFeaturestoreTest() { diff --git a/AiPlatform/tests/Unit/V1/JobServiceClientTest.php b/AiPlatform/tests/Unit/V1/JobServiceClientTest.php index c241ddde2c64..f4fd5eebb1a7 100644 --- a/AiPlatform/tests/Unit/V1/JobServiceClientTest.php +++ b/AiPlatform/tests/Unit/V1/JobServiceClientTest.php @@ -393,6 +393,7 @@ public function createBatchPredictionJobTest() $modelVersionId = 'modelVersionId-1385431880'; $serviceAccount = 'serviceAccount-1948028253'; $generateExplanation = false; + $disableContainerLogging = true; $expectedResponse = new BatchPredictionJob(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); @@ -400,6 +401,7 @@ public function createBatchPredictionJobTest() $expectedResponse->setModelVersionId($modelVersionId); $expectedResponse->setServiceAccount($serviceAccount); $expectedResponse->setGenerateExplanation($generateExplanation); + $expectedResponse->setDisableContainerLogging($disableContainerLogging); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -1647,6 +1649,7 @@ public function getBatchPredictionJobTest() $modelVersionId = 'modelVersionId-1385431880'; $serviceAccount = 'serviceAccount-1948028253'; $generateExplanation = false; + $disableContainerLogging = true; $expectedResponse = new BatchPredictionJob(); $expectedResponse->setName($name2); $expectedResponse->setDisplayName($displayName); @@ -1654,6 +1657,7 @@ public function getBatchPredictionJobTest() $expectedResponse->setModelVersionId($modelVersionId); $expectedResponse->setServiceAccount($serviceAccount); $expectedResponse->setGenerateExplanation($generateExplanation); + $expectedResponse->setDisableContainerLogging($disableContainerLogging); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->batchPredictionJobName('[PROJECT]', '[LOCATION]', '[BATCH_PREDICTION_JOB]'); diff --git a/AiPlatform/tests/Unit/V1/ModelServiceClientTest.php b/AiPlatform/tests/Unit/V1/ModelServiceClientTest.php index ccc03ed82c89..1baf35084d6f 100644 --- a/AiPlatform/tests/Unit/V1/ModelServiceClientTest.php +++ b/AiPlatform/tests/Unit/V1/ModelServiceClientTest.php @@ -27,6 +27,7 @@ use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; +use Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsResponse; use Google\Cloud\AIPlatform\V1\BatchImportModelEvaluationSlicesResponse; use Google\Cloud\AIPlatform\V1\CopyModelResponse; use Google\Cloud\AIPlatform\V1\ExportModelRequest\OutputConfig; @@ -80,6 +81,70 @@ private function createClient(array $options = []) return new ModelServiceClient($options); } + /** @test */ + public function batchImportEvaluatedAnnotationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $importedEvaluatedAnnotationsCount = 765638363; + $expectedResponse = new BatchImportEvaluatedAnnotationsResponse(); + $expectedResponse->setImportedEvaluatedAnnotationsCount($importedEvaluatedAnnotationsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->modelEvaluationSliceName('[PROJECT]', '[LOCATION]', '[MODEL]', '[EVALUATION]', '[SLICE]'); + $evaluatedAnnotations = []; + $response = $gapicClient->batchImportEvaluatedAnnotations($formattedParent, $evaluatedAnnotations); + $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.ModelService/BatchImportEvaluatedAnnotations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEvaluatedAnnotations(); + $this->assertProtobufEquals($evaluatedAnnotations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchImportEvaluatedAnnotationsExceptionTest() + { + $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->modelEvaluationSliceName('[PROJECT]', '[LOCATION]', '[MODEL]', '[EVALUATION]', '[SLICE]'); + $evaluatedAnnotations = []; + try { + $gapicClient->batchImportEvaluatedAnnotations($formattedParent, $evaluatedAnnotations); + // 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 batchImportModelEvaluationSlicesTest() {