Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit e1c5cd6

Browse files
feat: add deleteFeatureValues in aiplatform v1beta1 featurestore_service.proto (#371)
* feat: add deleteFeatureValues in aiplatform v1beta1 featurestore_service.proto PiperOrigin-RevId: 474635535 Source-Link: googleapis/googleapis@39c28bf Source-Link: https://github.com/googleapis/googleapis-gen/commit/71f2abfb343562ce40b79c3b56fc97ec5a0dccb1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzFmMmFiZmIzNDM1NjJjZTQwYjc5YzNiNTZmYzk3ZWM1YTBkY2NiMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6860cfd commit e1c5cd6

10 files changed

+2303
-0
lines changed

protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto

+77
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,29 @@ service FeaturestoreService {
280280
};
281281
}
282282

283+
// Delete Feature values from Featurestore.
284+
//
285+
// The progress of the deletion is tracked by the returned operation. The
286+
// deleted feature values are guaranteed to be invisible to subsequent read
287+
// operations after the operation is marked as successfully done.
288+
//
289+
// If a delete feature values operation fails, the feature values
290+
// returned from reads and exports may be inconsistent. If consistency is
291+
// required, the caller must retry the same delete request again and wait till
292+
// the new operation returned is marked as successfully done.
293+
rpc DeleteFeatureValues(DeleteFeatureValuesRequest)
294+
returns (google.longrunning.Operation) {
295+
option (google.api.http) = {
296+
post: "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues"
297+
body: "*"
298+
};
299+
option (google.api.method_signature) = "entity_type";
300+
option (google.longrunning.operation_info) = {
301+
response_type: "DeleteFeatureValuesResponse"
302+
metadata_type: "DeleteFeatureValuesOperationMetadata"
303+
};
304+
}
305+
283306
// Searches Features matching a query in a given project.
284307
rpc SearchFeatures(SearchFeaturesRequest) returns (SearchFeaturesResponse) {
285308
option (google.api.http) = {
@@ -1207,6 +1230,12 @@ message BatchReadFeatureValuesOperationMetadata {
12071230
GenericOperationMetadata generic_metadata = 1;
12081231
}
12091232

1233+
// Details of operations that delete Feature values.
1234+
message DeleteFeatureValuesOperationMetadata {
1235+
// Operation metadata for Featurestore delete Features values.
1236+
GenericOperationMetadata generic_metadata = 1;
1237+
}
1238+
12101239
// Details of operations that perform create EntityType.
12111240
message CreateEntityTypeOperationMetadata {
12121241
// Operation metadata for EntityType.
@@ -1224,3 +1253,51 @@ message BatchCreateFeaturesOperationMetadata {
12241253
// Operation metadata for Feature.
12251254
GenericOperationMetadata generic_metadata = 1;
12261255
}
1256+
1257+
// Request message for
1258+
// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues].
1259+
message DeleteFeatureValuesRequest {
1260+
// Message to select entity.
1261+
// If an entity id is selected, all the feature values corresponding to the
1262+
// entity id will be deleted, including the entityId.
1263+
message SelectEntity {
1264+
// Required. Selectors choosing feature values of which entity id to be
1265+
// deleted from the EntityType.
1266+
EntityIdSelector entity_id_selector = 1
1267+
[(google.api.field_behavior) = REQUIRED];
1268+
}
1269+
1270+
// Defines options to select feature values to be deleted.
1271+
oneof DeleteOption {
1272+
// Select feature values to be deleted by specifying entities.
1273+
SelectEntity select_entity = 2;
1274+
}
1275+
1276+
// Required. The resource name of the EntityType grouping the Features for
1277+
// which values are being deleted from. Format:
1278+
// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
1279+
string entity_type = 1 [
1280+
(google.api.field_behavior) = REQUIRED,
1281+
(google.api.resource_reference) = {
1282+
type: "aiplatform.googleapis.com/EntityType"
1283+
}
1284+
];
1285+
}
1286+
1287+
// Response message for
1288+
// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues].
1289+
message DeleteFeatureValuesResponse {}
1290+
1291+
// Selector for entityId. Getting ids from the given source.
1292+
message EntityIdSelector {
1293+
// Details about the source data, including the location of the storage and
1294+
// the format.
1295+
oneof EntityIdsSource {
1296+
// Source of Csv
1297+
CsvSource csv_source = 3;
1298+
}
1299+
1300+
// Source column that holds entity IDs. If not provided, entity IDs are
1301+
// extracted from the column named `entity_id`.
1302+
string entity_id_field = 5;
1303+
}

protos/protos.d.ts

+521
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

+1,126
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.json

+94
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(entityType) {
24+
// [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* Select feature values to be deleted by specifying entities.
33+
*/
34+
// const selectEntity = {}
35+
/**
36+
* Required. The resource name of the EntityType grouping the Features for
37+
* which values are being deleted from. Format:
38+
* `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
39+
*/
40+
// const entityType = 'abc123'
41+
42+
// Imports the Aiplatform library
43+
const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1;
44+
45+
// Instantiates a client
46+
const aiplatformClient = new FeaturestoreServiceClient();
47+
48+
async function callDeleteFeatureValues() {
49+
// Construct request
50+
const request = {
51+
entityType,
52+
};
53+
54+
// Run request
55+
const [operation] = await aiplatformClient.deleteFeatureValues(request);
56+
const [response] = await operation.promise();
57+
console.log(response);
58+
}
59+
60+
callDeleteFeatureValues();
61+
// [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async]
62+
}
63+
64+
process.on('unhandledRejection', err => {
65+
console.error(err.message);
66+
process.exitCode = 1;
67+
});
68+
main(...process.argv.slice(2));

samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json

+44
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,50 @@
21952195
}
21962196
}
21972197
},
2198+
{
2199+
"regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async",
2200+
"title": "DatasetService deleteFeatureValues Sample",
2201+
"origin": "API_DEFINITION",
2202+
"description": " 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.",
2203+
"canonical": true,
2204+
"file": "featurestore_service.delete_feature_values.js",
2205+
"language": "JAVASCRIPT",
2206+
"segments": [
2207+
{
2208+
"start": 25,
2209+
"end": 60,
2210+
"type": "FULL"
2211+
}
2212+
],
2213+
"clientMethod": {
2214+
"shortName": "DeleteFeatureValues",
2215+
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues",
2216+
"async": true,
2217+
"parameters": [
2218+
{
2219+
"name": "select_entity",
2220+
"type": ".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity"
2221+
},
2222+
{
2223+
"name": "entity_type",
2224+
"type": "TYPE_STRING"
2225+
}
2226+
],
2227+
"resultType": ".google.longrunning.Operation",
2228+
"client": {
2229+
"shortName": "FeaturestoreServiceClient",
2230+
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient"
2231+
},
2232+
"method": {
2233+
"shortName": "DeleteFeatureValues",
2234+
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues",
2235+
"service": {
2236+
"shortName": "FeaturestoreService",
2237+
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService"
2238+
}
2239+
}
2240+
}
2241+
},
21982242
{
21992243
"regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_SearchFeatures_async",
22002244
"title": "DatasetService searchFeatures Sample",

0 commit comments

Comments
 (0)