Skip to content

Commit 451de89

Browse files
gcf-owl-bot[bot]quirogaspearigee
authored
feat: [vectorsearch] Mark Vector Search v1 API as GA (#7610)
* feat: Mark Vector Search v1 API as GA feat: Add support for ExportDataObjects PiperOrigin-RevId: 882214457 Source-Link: googleapis/googleapis@19890a0 Source-Link: googleapis/googleapis-gen@9c6045b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZlY3RvcnNlYXJjaC8uT3dsQm90LnlhbWwiLCJoIjoiOWM2MDQ1YmRhNzE0YjdmNGFiZjUyMjczOTFkZWY4YzY3YWUxMmE5OCJ9 * 🦉 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> Co-authored-by: Santiago Quiroga <22756465+quirogas@users.noreply.github.com> Co-authored-by: Gabe Pearhill <86282859+pearigee@users.noreply.github.com>
1 parent 9de1438 commit 451de89

11 files changed

Lines changed: 1964 additions & 2 deletions

packages/google-cloud-vectorsearch/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
7373
| create index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.create_index.js) |
7474
| delete collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.delete_collection.js) |
7575
| delete index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.delete_index.js) |
76+
| export data objects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.export_data_objects.js) |
7677
| get collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.get_collection.js) |
7778
| get index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.get_index.js) |
7879
| import data objects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-vectorsearch/samples/generated/v1/vector_search_service.import_data_objects.js) |

packages/google-cloud-vectorsearch/protos/google/cloud/vectorsearch/v1/vectorsearch_service.proto

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,19 @@ service VectorSearchService {
159159
metadata_type: "ImportDataObjectsMetadata"
160160
};
161161
}
162+
163+
// Initiates a Long-Running Operation to export DataObjects from a Collection.
164+
rpc ExportDataObjects(ExportDataObjectsRequest)
165+
returns (google.longrunning.Operation) {
166+
option (google.api.http) = {
167+
post: "/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects"
168+
body: "*"
169+
};
170+
option (google.longrunning.operation_info) = {
171+
response_type: "ExportDataObjectsResponse"
172+
metadata_type: "ExportDataObjectsMetadata"
173+
};
174+
}
162175
}
163176

164177
// Message describing Collection object
@@ -654,6 +667,59 @@ message ImportDataObjectsResponse {
654667
google.rpc.Status status = 1;
655668
}
656669

670+
// Request message for
671+
// [VectorSearchService.ExportDataObjects][google.cloud.vectorsearch.v1.VectorSearchService.ExportDataObjects].
672+
message ExportDataObjectsRequest {
673+
// Google Cloud Storage configuration for the export.
674+
message GcsExportDestination {
675+
// Options for the format of the exported Data Objects.
676+
enum Format {
677+
// Unspecified format.
678+
FORMAT_UNSPECIFIED = 0;
679+
680+
// Exports Data Objects in `JSONL` format.
681+
JSONL = 2;
682+
}
683+
684+
// Required. URI prefix of the Cloud Storage where to export Data Objects.
685+
// The bucket is required to be in the same region as the collection.
686+
string export_uri = 1 [(google.api.field_behavior) = REQUIRED];
687+
688+
// Required. The format of the exported Data Objects.
689+
Format format = 2 [(google.api.field_behavior) = REQUIRED];
690+
}
691+
692+
// The configuration for the export data.
693+
oneof destination {
694+
// The Cloud Storage location where user wants to export Data Objects.
695+
GcsExportDestination gcs_destination = 2;
696+
}
697+
698+
// Required. The resource name of the Collection from which we want to export
699+
// Data Objects. Format:
700+
// `projects/{project}/locations/{location}/collections/{collection}`.
701+
string name = 1 [
702+
(google.api.field_behavior) = REQUIRED,
703+
(google.api.resource_reference) = {
704+
type: "vectorsearch.googleapis.com/Collection"
705+
}
706+
];
707+
}
708+
709+
// Metadata for the ExportDataObjects LRO.
710+
message ExportDataObjectsMetadata {
711+
// Output only. The time the operation was created.
712+
google.protobuf.Timestamp create_time = 1
713+
[(google.api.field_behavior) = OUTPUT_ONLY];
714+
715+
// Output only. The time the operation finished.
716+
google.protobuf.Timestamp finish_time = 2
717+
[(google.api.field_behavior) = OUTPUT_ONLY];
718+
}
719+
720+
// Response for the ExportDataObjects LRO.
721+
message ExportDataObjectsResponse {}
722+
657723
// Represents dedicated infrastructure for the index.
658724
message DedicatedInfrastructure {
659725
// Specification for autoscaling.

packages/google-cloud-vectorsearch/protos/protos.d.ts

Lines changed: 436 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-vectorsearch/protos/protos.js

Lines changed: 964 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-vectorsearch/protos/protos.json

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-vectorsearch/samples/generated/v1/snippet_metadata_google.cloud.vectorsearch.v1.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,50 @@
10061006
}
10071007
}
10081008
}
1009+
},
1010+
{
1011+
"regionTag": "vectorsearch_v1_generated_VectorSearchService_ExportDataObjects_async",
1012+
"title": "DataObjectSearchService exportDataObjects Sample",
1013+
"origin": "API_DEFINITION",
1014+
"description": " Initiates a Long-Running Operation to export DataObjects from a Collection.",
1015+
"canonical": true,
1016+
"file": "vector_search_service.export_data_objects.js",
1017+
"language": "JAVASCRIPT",
1018+
"segments": [
1019+
{
1020+
"start": 25,
1021+
"end": 60,
1022+
"type": "FULL"
1023+
}
1024+
],
1025+
"clientMethod": {
1026+
"shortName": "ExportDataObjects",
1027+
"fullName": "google.cloud.vectorsearch.v1.VectorSearchService.ExportDataObjects",
1028+
"async": true,
1029+
"parameters": [
1030+
{
1031+
"name": "gcs_destination",
1032+
"type": ".google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination"
1033+
},
1034+
{
1035+
"name": "name",
1036+
"type": "TYPE_STRING"
1037+
}
1038+
],
1039+
"resultType": ".google.longrunning.Operation",
1040+
"client": {
1041+
"shortName": "VectorSearchServiceClient",
1042+
"fullName": "google.cloud.vectorsearch.v1.VectorSearchServiceClient"
1043+
},
1044+
"method": {
1045+
"shortName": "ExportDataObjects",
1046+
"fullName": "google.cloud.vectorsearch.v1.VectorSearchService.ExportDataObjects",
1047+
"service": {
1048+
"shortName": "VectorSearchService",
1049+
"fullName": "google.cloud.vectorsearch.v1.VectorSearchService"
1050+
}
1051+
}
1052+
}
10091053
}
10101054
]
10111055
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright 2026 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(name) {
24+
// [START vectorsearch_v1_generated_VectorSearchService_ExportDataObjects_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+
* The Cloud Storage location where user wants to export Data Objects.
33+
*/
34+
// const gcsDestination = {}
35+
/**
36+
* Required. The resource name of the Collection from which we want to export
37+
* Data Objects. Format:
38+
* `projects/{project}/locations/{location}/collections/{collection}`.
39+
*/
40+
// const name = 'abc123'
41+
42+
// Imports the Vectorsearch library
43+
const {VectorSearchServiceClient} = require('@google-cloud/vectorsearch').v1;
44+
45+
// Instantiates a client
46+
const vectorsearchClient = new VectorSearchServiceClient();
47+
48+
async function callExportDataObjects() {
49+
// Construct request
50+
const request = {
51+
name,
52+
};
53+
54+
// Run request
55+
const [operation] = await vectorsearchClient.exportDataObjects(request);
56+
const [response] = await operation.promise();
57+
console.log(response);
58+
}
59+
60+
callExportDataObjects();
61+
// [END vectorsearch_v1_generated_VectorSearchService_ExportDataObjects_async]
62+
}
63+
64+
process.on('unhandledRejection', err => {
65+
console.error(err.message);
66+
process.exitCode = 1;
67+
});
68+
main(...process.argv.slice(2));

packages/google-cloud-vectorsearch/src/v1/gapic_metadata.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@
196196
"importDataObjects"
197197
]
198198
},
199+
"ExportDataObjects": {
200+
"methods": [
201+
"exportDataObjects"
202+
]
203+
},
199204
"ListCollections": {
200205
"methods": [
201206
"listCollections",
@@ -255,6 +260,11 @@
255260
"importDataObjects"
256261
]
257262
},
263+
"ExportDataObjects": {
264+
"methods": [
265+
"exportDataObjects"
266+
]
267+
},
258268
"ListCollections": {
259269
"methods": [
260270
"listCollections",

0 commit comments

Comments
 (0)