@google-cloud/vectorsearch 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +134 -0
  3. package/build/protos/google/cloud/vectorsearch/v1beta/common.proto +34 -0
  4. package/build/protos/google/cloud/vectorsearch/v1beta/data_object.proto +92 -0
  5. package/build/protos/google/cloud/vectorsearch/v1beta/data_object_search_service.proto +428 -0
  6. package/build/protos/google/cloud/vectorsearch/v1beta/data_object_service.proto +233 -0
  7. package/build/protos/google/cloud/vectorsearch/v1beta/embedding_config.proto +71 -0
  8. package/build/protos/google/cloud/vectorsearch/v1beta/vectorsearch_service.proto +631 -0
  9. package/build/protos/protos.d.ts +15049 -0
  10. package/build/protos/protos.js +39060 -0
  11. package/build/protos/protos.json +4174 -0
  12. package/build/src/index.d.ts +17 -0
  13. package/build/src/index.js +32 -0
  14. package/build/src/index.js.map +1 -0
  15. package/build/src/v1beta/data_object_search_service_client.d.ts +574 -0
  16. package/build/src/v1beta/data_object_search_service_client.js +849 -0
  17. package/build/src/v1beta/data_object_search_service_client.js.map +1 -0
  18. package/build/src/v1beta/data_object_search_service_client_config.json +58 -0
  19. package/build/src/v1beta/data_object_search_service_proto_list.json +8 -0
  20. package/build/src/v1beta/data_object_service_client.d.ts +486 -0
  21. package/build/src/v1beta/data_object_service_client.js +767 -0
  22. package/build/src/v1beta/data_object_service_client.js.map +1 -0
  23. package/build/src/v1beta/data_object_service_client_config.json +73 -0
  24. package/build/src/v1beta/data_object_service_proto_list.json +8 -0
  25. package/build/src/v1beta/gapic_metadata.json +277 -0
  26. package/build/src/v1beta/index.d.ts +3 -0
  27. package/build/src/v1beta/index.js +27 -0
  28. package/build/src/v1beta/index.js.map +1 -0
  29. package/build/src/v1beta/vector_search_service_client.d.ts +1020 -0
  30. package/build/src/v1beta/vector_search_service_client.js +1387 -0
  31. package/build/src/v1beta/vector_search_service_client.js.map +1 -0
  32. package/build/src/v1beta/vector_search_service_client_config.json +88 -0
  33. package/build/src/v1beta/vector_search_service_proto_list.json +8 -0
  34. package/package.json +70 -0
@@ -0,0 +1,428 @@
1
+ // Copyright 2025 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
+ // http://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
+ syntax = "proto3";
16
+
17
+ package google.cloud.vectorsearch.v1beta;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/vectorsearch/v1beta/common.proto";
24
+ import "google/cloud/vectorsearch/v1beta/data_object.proto";
25
+ import "google/cloud/vectorsearch/v1beta/embedding_config.proto";
26
+ import "google/protobuf/struct.proto";
27
+
28
+ option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "DataObjectSearchServiceProto";
31
+ option java_package = "com.google.cloud.vectorsearch.v1beta";
32
+
33
+ // Service for searching data objects.
34
+ service DataObjectSearchService {
35
+ option (google.api.default_host) = "vectorsearch.googleapis.com";
36
+ option (google.api.oauth_scopes) =
37
+ "https://www.googleapis.com/auth/cloud-platform";
38
+
39
+ // Searches data objects.
40
+ rpc SearchDataObjects(SearchDataObjectsRequest)
41
+ returns (SearchDataObjectsResponse) {
42
+ option (google.api.http) = {
43
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:search"
44
+ body: "*"
45
+ };
46
+ }
47
+
48
+ // Queries data objects.
49
+ rpc QueryDataObjects(QueryDataObjectsRequest)
50
+ returns (QueryDataObjectsResponse) {
51
+ option (google.api.http) = {
52
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:query"
53
+ body: "*"
54
+ };
55
+ }
56
+
57
+ // Aggregates data objects.
58
+ rpc AggregateDataObjects(AggregateDataObjectsRequest)
59
+ returns (AggregateDataObjectsResponse) {
60
+ option (google.api.http) = {
61
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:aggregate"
62
+ body: "*"
63
+ };
64
+ }
65
+
66
+ // Batch searches data objects.
67
+ rpc BatchSearchDataObjects(BatchSearchDataObjectsRequest)
68
+ returns (BatchSearchDataObjectsResponse) {
69
+ option (google.api.http) = {
70
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:batchSearch"
71
+ body: "*"
72
+ };
73
+ }
74
+ }
75
+
76
+ // Aggregation methods.
77
+ enum AggregationMethod {
78
+ // Should not be used.
79
+ AGGREGATION_METHOD_UNSPECIFIED = 0;
80
+
81
+ // Count the number of data objects that match the filter.
82
+ COUNT = 1;
83
+ }
84
+
85
+ // Defines a output fields struct for data in DataObject.
86
+ message OutputFields {
87
+ // Optional. The fields from the data fields to include in the output.
88
+ repeated string data_fields = 1 [(google.api.field_behavior) = OPTIONAL];
89
+
90
+ // Optional. The fields from the vector fields to include in the output.
91
+ repeated string vector_fields = 2 [(google.api.field_behavior) = OPTIONAL];
92
+
93
+ // Optional. The fields from the DataObject metadata to include in the output.
94
+ repeated string metadata_fields = 3 [(google.api.field_behavior) = OPTIONAL];
95
+ }
96
+
97
+ // Represents a hint to the search index engine.
98
+ message SearchHint {
99
+ // Message to specify the index to use for the search.
100
+ message IndexHint {
101
+ // Required. The resource name of the index to use for the search.
102
+ // The index must be in the same project, location, and collection.
103
+ // Format:
104
+ // `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
105
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
106
+ }
107
+
108
+ // The type of index to use.
109
+ oneof index_type {
110
+ // Specifies that the search should use a particular index.
111
+ IndexHint use_index = 1;
112
+
113
+ // If set to true, the search will use the system's default
114
+ // K-Nearest Neighbor (KNN) index engine.
115
+ bool use_knn = 2;
116
+ }
117
+ }
118
+
119
+ // A single search request within a batch operation.
120
+ message Search {
121
+ // The type of search to perform.
122
+ oneof search_type {
123
+ // A vector-based search.
124
+ VectorSearch vector_search = 1;
125
+
126
+ // A semantic search.
127
+ SemanticSearch semantic_search = 2;
128
+
129
+ // A text search operation.
130
+ TextSearch text_search = 3;
131
+ }
132
+ }
133
+
134
+ // Defines a search operation using a query vector.
135
+ message VectorSearch {
136
+ oneof vector_type {
137
+ // A dense vector for the query.
138
+ DenseVector vector = 1;
139
+
140
+ // A sparse vector for the query.
141
+ SparseVector sparse_vector = 2;
142
+ }
143
+
144
+ // Required. The vector field to search.
145
+ string search_field = 8 [(google.api.field_behavior) = REQUIRED];
146
+
147
+ // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
148
+ // represented as a google.protobuf.Struct.
149
+ google.protobuf.Struct filter = 4 [(google.api.field_behavior) = OPTIONAL];
150
+
151
+ // Optional. The number of nearest neighbors to return.
152
+ optional int32 top_k = 5 [(google.api.field_behavior) = OPTIONAL];
153
+
154
+ // Optional. Mask specifying which fields to return.
155
+ OutputFields output_fields = 7 [(google.api.field_behavior) = OPTIONAL];
156
+
157
+ // Optional. Sets the search hint. If no strategy is specified, the service
158
+ // will use an index if one is available, and fall back to the default KNN
159
+ // search otherwise.
160
+ SearchHint search_hint = 9 [(google.api.field_behavior) = OPTIONAL];
161
+
162
+ // Optional. The distance metric to use for the KNN search. If not specified,
163
+ // DOT_PRODUCT will be used as the default.
164
+ DistanceMetric distance_metric = 11 [(google.api.field_behavior) = OPTIONAL];
165
+ }
166
+
167
+ // Defines a semantic search operation.
168
+ message SemanticSearch {
169
+ // Required. The query text, which is used to generate an embedding according
170
+ // to the embedding model specified in the collection config.
171
+ string search_text = 1 [(google.api.field_behavior) = REQUIRED];
172
+
173
+ // Required. The vector field to search.
174
+ string search_field = 2 [(google.api.field_behavior) = REQUIRED];
175
+
176
+ // Optional. The task type of the query embedding.
177
+ EmbeddingTaskType task_type = 5 [(google.api.field_behavior) = OPTIONAL];
178
+
179
+ // Optional. The fields to return in the search results.
180
+ OutputFields output_fields = 3 [(google.api.field_behavior) = OPTIONAL];
181
+
182
+ // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
183
+ // represented as a google.protobuf.Struct.
184
+ google.protobuf.Struct filter = 6 [(google.api.field_behavior) = OPTIONAL];
185
+
186
+ // Optional. The number of data objects to return.
187
+ optional int32 top_k = 4 [(google.api.field_behavior) = OPTIONAL];
188
+ }
189
+
190
+ // Defines a text search operation.
191
+ message TextSearch {
192
+ // Required. The query text.
193
+ string search_text = 1 [(google.api.field_behavior) = REQUIRED];
194
+
195
+ // Required. The data field names to search.
196
+ repeated string data_field_names = 2 [(google.api.field_behavior) = REQUIRED];
197
+
198
+ // Optional. The fields to return in the search results.
199
+ OutputFields output_fields = 3 [(google.api.field_behavior) = OPTIONAL];
200
+
201
+ // Optional. The number of results to return.
202
+ optional int32 top_k = 4 [(google.api.field_behavior) = OPTIONAL];
203
+ }
204
+
205
+ // Request for performing a single search.
206
+ message SearchDataObjectsRequest {
207
+ // The query to search for.
208
+ oneof search_type {
209
+ // A vector search operation.
210
+ VectorSearch vector_search = 2;
211
+
212
+ // A semantic search operation.
213
+ SemanticSearch semantic_search = 4;
214
+
215
+ // Optional. A text search operation.
216
+ TextSearch text_search = 7 [(google.api.field_behavior) = OPTIONAL];
217
+ }
218
+
219
+ // Required. The resource name of the Collection for which to search.
220
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`
221
+ string parent = 1 [
222
+ (google.api.field_behavior) = REQUIRED,
223
+ (google.api.resource_reference) = {
224
+ type: "vectorsearch.googleapis.com/Collection"
225
+ }
226
+ ];
227
+
228
+ // Optional. The standard list page size.
229
+ int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];
230
+
231
+ // Optional. The standard list page token.
232
+ // Typically obtained via
233
+ // [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse.next_page_token]
234
+ // of the previous
235
+ // [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.SearchDataObjects]
236
+ // call.
237
+ string page_token = 6 [(google.api.field_behavior) = OPTIONAL];
238
+ }
239
+
240
+ // A single search result.
241
+ message SearchResult {
242
+ // Output only. The matching data object.
243
+ DataObject data_object = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
244
+
245
+ // Output only. The similarity distance.
246
+ optional double distance = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
247
+ }
248
+
249
+ // Metadata about the search execution.
250
+ message SearchResponseMetadata {
251
+ // Message that indicates the index used for the search.
252
+ message IndexInfo {
253
+ // Output only. The resource name of the index used for the search.
254
+ // Format:
255
+ // `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
256
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
257
+ }
258
+
259
+ // The type of index used.
260
+ oneof index_type {
261
+ // Indicates that the search used a particular index.
262
+ IndexInfo used_index = 1;
263
+
264
+ // Output only. If true, the search used the system's default
265
+ // K-Nearest Neighbor (KNN) index engine.
266
+ bool used_knn = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
267
+ }
268
+ }
269
+
270
+ // Response for a search request.
271
+ message SearchDataObjectsResponse {
272
+ // Output only. The list of dataObjects that match the search criteria.
273
+ repeated SearchResult results = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
274
+
275
+ // Output only. A token to retrieve next page of results.
276
+ // Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to
277
+ // obtain that page.
278
+ string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
279
+
280
+ // Output only. Metadata about the search execution.
281
+ SearchResponseMetadata search_response_metadata = 3
282
+ [(google.api.field_behavior) = OUTPUT_ONLY];
283
+ }
284
+
285
+ // Request message for
286
+ // [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects].
287
+ message AggregateDataObjectsRequest {
288
+ // Required. The resource name of the Collection for which to query.
289
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`
290
+ string parent = 1 [
291
+ (google.api.field_behavior) = REQUIRED,
292
+ (google.api.resource_reference) = {
293
+ type: "vectorsearch.googleapis.com/Collection"
294
+ }
295
+ ];
296
+
297
+ // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
298
+ // represented as a google.protobuf.Struct.
299
+ google.protobuf.Struct filter = 2 [(google.api.field_behavior) = OPTIONAL];
300
+
301
+ // Required. The aggregation method to apply to the query.
302
+ AggregationMethod aggregate = 3 [(google.api.field_behavior) = REQUIRED];
303
+ }
304
+
305
+ // Response message for
306
+ // [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects].
307
+ message AggregateDataObjectsResponse {
308
+ // The aggregated results of the query.
309
+ repeated google.protobuf.Struct aggregate_results = 1;
310
+ }
311
+
312
+ // Request message for
313
+ // [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects].
314
+ message QueryDataObjectsRequest {
315
+ // Required. The resource name of the Collection for which to query.
316
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`
317
+ string parent = 1 [
318
+ (google.api.field_behavior) = REQUIRED,
319
+ (google.api.resource_reference) = {
320
+ type: "vectorsearch.googleapis.com/Collection"
321
+ }
322
+ ];
323
+
324
+ // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
325
+ // represented as a google.protobuf.Struct.
326
+ google.protobuf.Struct filter = 2 [(google.api.field_behavior) = OPTIONAL];
327
+
328
+ // Optional. Mask specifying which fields to return.
329
+ OutputFields output_fields = 7 [(google.api.field_behavior) = OPTIONAL];
330
+
331
+ // Optional. The standard list page size.
332
+ int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];
333
+
334
+ // Optional. The standard list page token.
335
+ // Typically obtained via
336
+ // [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1beta.QueryDataObjectsResponse.next_page_token]
337
+ // of the previous
338
+ // [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects]
339
+ // call.
340
+ string page_token = 6 [(google.api.field_behavior) = OPTIONAL];
341
+ }
342
+
343
+ // Response message for
344
+ // [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects].
345
+ message QueryDataObjectsResponse {
346
+ // The list of dataObjects that match the query.
347
+ repeated DataObject data_objects = 4;
348
+
349
+ // A token to retrieve next page of results.
350
+ // Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to
351
+ // obtain that page.
352
+ string next_page_token = 3;
353
+ }
354
+
355
+ // A request to perform a batch of search operations.
356
+ message BatchSearchDataObjectsRequest {
357
+ // Options for combining the results of the batch search operations.
358
+ message CombineResultsOptions {
359
+ // Required. The ranker to use for combining the results.
360
+ Ranker ranker = 1 [(google.api.field_behavior) = REQUIRED];
361
+
362
+ // Optional. Mask specifying which fields to return.
363
+ OutputFields output_fields = 2 [(google.api.field_behavior) = OPTIONAL];
364
+
365
+ // Optional. The number of results to return. If not set, a default value
366
+ // will be used.
367
+ int32 top_k = 3 [(google.api.field_behavior) = OPTIONAL];
368
+ }
369
+
370
+ // Required. The resource name of the Collection for which to search.
371
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`
372
+ string parent = 1 [
373
+ (google.api.field_behavior) = REQUIRED,
374
+ (google.api.resource_reference) = {
375
+ type: "vectorsearch.googleapis.com/Collection"
376
+ }
377
+ ];
378
+
379
+ // Required. A list of search requests to execute in parallel.
380
+ repeated Search searches = 2 [(google.api.field_behavior) = REQUIRED];
381
+
382
+ // Optional. Options for combining the results of the batch search operations.
383
+ CombineResultsOptions combine = 3 [(google.api.field_behavior) = OPTIONAL];
384
+ }
385
+
386
+ // Defines a ranker to combine results from multiple searches.
387
+ message Ranker {
388
+ // The ranking method to use.
389
+ oneof ranker {
390
+ // Reciprocal Rank Fusion ranking.
391
+ ReciprocalRankFusion rrf = 1;
392
+
393
+ // Vertex AI ranking.
394
+ VertexRanker vertex = 2;
395
+ }
396
+ }
397
+
398
+ // Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
399
+ message ReciprocalRankFusion {
400
+ // Required. The weights to apply to each search result set during fusion.
401
+ repeated double weights = 1 [(google.api.field_behavior) = REQUIRED];
402
+ }
403
+
404
+ // Defines a ranker using the Vertex AI ranking service.
405
+ // See https://cloud.google.com/generative-ai-app-builder/docs/ranking for
406
+ // details.
407
+ message VertexRanker {
408
+ // Required. The query against which the records are ranked and scored.
409
+ string query = 1 [(google.api.field_behavior) = REQUIRED];
410
+
411
+ // Optional. The template used to generate the record's title.
412
+ string title_template = 2 [(google.api.field_behavior) = OPTIONAL];
413
+
414
+ // Optional. The template used to generate the record's content.
415
+ string content_template = 3 [(google.api.field_behavior) = OPTIONAL];
416
+
417
+ // Required. The model used for ranking documents. If no model is specified,
418
+ // then semantic-ranker-default@latest is used.
419
+ string model = 4 [(google.api.field_behavior) = REQUIRED];
420
+ }
421
+
422
+ // A response from a batch search operation.
423
+ message BatchSearchDataObjectsResponse {
424
+ // Output only. A list of search responses, one for each request in the batch.
425
+ // If a ranker is used, a single ranked list of results is returned.
426
+ repeated SearchDataObjectsResponse results = 1
427
+ [(google.api.field_behavior) = OUTPUT_ONLY];
428
+ }
@@ -0,0 +1,233 @@
1
+ // Copyright 2025 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
+ // http://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
+ syntax = "proto3";
16
+
17
+ package google.cloud.vectorsearch.v1beta;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/vectorsearch/v1beta/data_object.proto";
24
+ import "google/protobuf/empty.proto";
25
+ import "google/protobuf/field_mask.proto";
26
+
27
+ option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
28
+ option java_multiple_files = true;
29
+ option java_outer_classname = "DataObjectServiceProto";
30
+ option java_package = "com.google.cloud.vectorsearch.v1beta";
31
+
32
+ // Service for creating and managing data objects.
33
+ service DataObjectService {
34
+ option (google.api.default_host) = "vectorsearch.googleapis.com";
35
+ option (google.api.oauth_scopes) =
36
+ "https://www.googleapis.com/auth/cloud-platform";
37
+
38
+ // Creates a dataObject.
39
+ rpc CreateDataObject(CreateDataObjectRequest) returns (DataObject) {
40
+ option (google.api.http) = {
41
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects"
42
+ body: "data_object"
43
+ };
44
+ option (google.api.method_signature) = "parent,data_object,data_object_id";
45
+ }
46
+
47
+ // Creates a batch of dataObjects.
48
+ rpc BatchCreateDataObjects(BatchCreateDataObjectsRequest)
49
+ returns (BatchCreateDataObjectsResponse) {
50
+ option (google.api.http) = {
51
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:batchCreate"
52
+ body: "*"
53
+ };
54
+ }
55
+
56
+ // Gets a data object.
57
+ rpc GetDataObject(GetDataObjectRequest) returns (DataObject) {
58
+ option (google.api.http) = {
59
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/dataObjects/*}"
60
+ };
61
+ option (google.api.method_signature) = "name";
62
+ }
63
+
64
+ // Updates a dataObject.
65
+ rpc UpdateDataObject(UpdateDataObjectRequest) returns (DataObject) {
66
+ option (google.api.http) = {
67
+ patch: "/v1beta/{data_object.name=projects/*/locations/*/collections/*/dataObjects/*}"
68
+ body: "data_object"
69
+ };
70
+ option (google.api.method_signature) = "data_object,update_mask";
71
+ }
72
+
73
+ // Updates dataObjects in a batch.
74
+ rpc BatchUpdateDataObjects(BatchUpdateDataObjectsRequest)
75
+ returns (BatchUpdateDataObjectsResponse) {
76
+ option (google.api.http) = {
77
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:batchUpdate"
78
+ body: "*"
79
+ };
80
+ option (google.api.method_signature) = "parent,requests";
81
+ }
82
+
83
+ // Deletes a dataObject.
84
+ rpc DeleteDataObject(DeleteDataObjectRequest)
85
+ returns (google.protobuf.Empty) {
86
+ option (google.api.http) = {
87
+ delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataObjects/*}"
88
+ };
89
+ option (google.api.method_signature) = "name";
90
+ }
91
+
92
+ // Deletes dataObjects in a batch.
93
+ rpc BatchDeleteDataObjects(BatchDeleteDataObjectsRequest)
94
+ returns (google.protobuf.Empty) {
95
+ option (google.api.http) = {
96
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*}/dataObjects:batchDelete"
97
+ body: "*"
98
+ };
99
+ option (google.api.method_signature) = "parent,requests";
100
+ }
101
+ }
102
+
103
+ // Request message for
104
+ // [DataObjectService.CreateDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.CreateDataObject].
105
+ message CreateDataObjectRequest {
106
+ // Required. The resource name of the Collection to create the DataObject in.
107
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`
108
+ string parent = 1 [
109
+ (google.api.field_behavior) = REQUIRED,
110
+ (google.api.resource_reference) = {
111
+ type: "vectorsearch.googleapis.com/Collection"
112
+ }
113
+ ];
114
+
115
+ // Required. The id of the dataObject to create.
116
+ // The id must be 1-63 characters long, and comply with
117
+ // <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
118
+ // Specifically, it must be 1-63 characters long and match the regular
119
+ // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
120
+ string data_object_id = 2 [(google.api.field_behavior) = REQUIRED];
121
+
122
+ // Required. The DataObject to create.
123
+ DataObject data_object = 3 [(google.api.field_behavior) = REQUIRED];
124
+ }
125
+
126
+ // Request message for
127
+ // [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects].
128
+ message BatchCreateDataObjectsRequest {
129
+ // Required. The resource name of the Collection to create the DataObjects in.
130
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`.
131
+ // The parent field in the CreateDataObjectRequest messages must match this
132
+ // field.
133
+ string parent = 1 [
134
+ (google.api.field_behavior) = REQUIRED,
135
+ (google.api.resource_reference) = {
136
+ type: "vectorsearch.googleapis.com/Collection"
137
+ }
138
+ ];
139
+
140
+ // Required. The request message specifying the resources to create.
141
+ // A maximum of 1000 DataObjects can be created in a batch.
142
+ repeated CreateDataObjectRequest requests = 2
143
+ [(google.api.field_behavior) = REQUIRED];
144
+ }
145
+
146
+ // Response message for
147
+ // [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects].
148
+ message BatchCreateDataObjectsResponse {
149
+ // DataObjects created.
150
+ repeated DataObject data_objects = 1;
151
+ }
152
+
153
+ // Request message for
154
+ // [DataObjectService.GetDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.GetDataObject].
155
+ message GetDataObjectRequest {
156
+ // Required. The name of the DataObject resource.
157
+ // Format:
158
+ // `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
159
+ string name = 1 [
160
+ (google.api.field_behavior) = REQUIRED,
161
+ (google.api.resource_reference) = {
162
+ type: "vectorsearch.googleapis.com/DataObject"
163
+ }
164
+ ];
165
+ }
166
+
167
+ // Request message for
168
+ // [DataObjectService.UpdateDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.UpdateDataObject].
169
+ message UpdateDataObjectRequest {
170
+ // Required. The DataObject which replaces the resource on the server.
171
+ DataObject data_object = 1 [(google.api.field_behavior) = REQUIRED];
172
+
173
+ // Optional. The update mask applies to the resource. See
174
+ // [google.protobuf.FieldMask][google.protobuf.FieldMask].
175
+ google.protobuf.FieldMask update_mask = 2
176
+ [(google.api.field_behavior) = OPTIONAL];
177
+ }
178
+
179
+ // Request message for
180
+ // [DataObjectService.BatchUpdateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects].
181
+ message BatchUpdateDataObjectsRequest {
182
+ // Required. The resource name of the Collection to update the DataObjects in.
183
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`.
184
+ // The parent field in the UpdateDataObjectRequest messages must match this
185
+ // field.
186
+ string parent = 1 [
187
+ (google.api.field_behavior) = REQUIRED,
188
+ (google.api.resource_reference) = {
189
+ type: "vectorsearch.googleapis.com/Collection"
190
+ }
191
+ ];
192
+
193
+ // Required. The request message specifying the resources to update.
194
+ // A maximum of 1000 DataObjects can be updated in a batch.
195
+ repeated UpdateDataObjectRequest requests = 2
196
+ [(google.api.field_behavior) = REQUIRED];
197
+ }
198
+
199
+ // Response message for
200
+ // [DataObjectService.BatchUpdateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects].
201
+ message BatchUpdateDataObjectsResponse {}
202
+
203
+ // Request message for
204
+ // [DataObjectService.DeleteDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.DeleteDataObject].
205
+ message DeleteDataObjectRequest {
206
+ // Required. The name of the DataObject resource to be deleted.
207
+ // Format:
208
+ // `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
209
+ string name = 1 [
210
+ (google.api.field_behavior) = REQUIRED,
211
+ (google.api.resource_reference) = {
212
+ type: "vectorsearch.googleapis.com/DataObject"
213
+ }
214
+ ];
215
+ }
216
+
217
+ // Request message for
218
+ // [DataObjectService.BatchDeleteDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchDeleteDataObjects].
219
+ message BatchDeleteDataObjectsRequest {
220
+ // Required. The resource name of the Collection to delete the DataObjects in.
221
+ // Format: `projects/{project}/locations/{location}/collections/{collection}`.
222
+ string parent = 1 [
223
+ (google.api.field_behavior) = REQUIRED,
224
+ (google.api.resource_reference) = {
225
+ type: "vectorsearch.googleapis.com/Collection"
226
+ }
227
+ ];
228
+
229
+ // Required. The request message specifying the resources to delete.
230
+ // A maximum of 1000 DataObjects can be deleted in a batch.
231
+ repeated DeleteDataObjectRequest requests = 3
232
+ [(google.api.field_behavior) = REQUIRED];
233
+ }