google-cloud-vector_search-v1 0.a → 0.3.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +153 -8
  5. data/lib/google/cloud/vector_search/v1/bindings_override.rb +75 -0
  6. data/lib/google/cloud/vector_search/v1/data_object_search_service/client.rb +851 -0
  7. data/lib/google/cloud/vector_search/v1/data_object_search_service/credentials.rb +47 -0
  8. data/lib/google/cloud/vector_search/v1/data_object_search_service/paths.rb +73 -0
  9. data/lib/google/cloud/vector_search/v1/data_object_search_service/rest/client.rb +788 -0
  10. data/lib/google/cloud/vector_search/v1/data_object_search_service/rest/service_stub.rb +329 -0
  11. data/lib/google/cloud/vector_search/v1/data_object_search_service/rest.rb +53 -0
  12. data/lib/google/cloud/vector_search/v1/data_object_search_service.rb +55 -0
  13. data/lib/google/cloud/vector_search/v1/data_object_service/client.rb +1115 -0
  14. data/lib/google/cloud/vector_search/v1/data_object_service/credentials.rb +47 -0
  15. data/lib/google/cloud/vector_search/v1/data_object_service/paths.rb +73 -0
  16. data/lib/google/cloud/vector_search/v1/data_object_service/rest/client.rb +1031 -0
  17. data/lib/google/cloud/vector_search/v1/data_object_service/rest/service_stub.rb +513 -0
  18. data/lib/google/cloud/vector_search/v1/data_object_service/rest.rb +53 -0
  19. data/lib/google/cloud/vector_search/v1/data_object_service.rb +55 -0
  20. data/lib/google/cloud/vector_search/v1/rest.rb +40 -0
  21. data/lib/google/cloud/vector_search/v1/vector_search_service/client.rb +1831 -0
  22. data/lib/google/cloud/vector_search/v1/vector_search_service/credentials.rb +47 -0
  23. data/lib/google/cloud/vector_search/v1/vector_search_service/operations.rb +843 -0
  24. data/lib/google/cloud/vector_search/v1/vector_search_service/paths.rb +111 -0
  25. data/lib/google/cloud/vector_search/v1/vector_search_service/rest/client.rb +1712 -0
  26. data/lib/google/cloud/vector_search/v1/vector_search_service/rest/operations.rb +927 -0
  27. data/lib/google/cloud/vector_search/v1/vector_search_service/rest/service_stub.rb +819 -0
  28. data/lib/google/cloud/vector_search/v1/vector_search_service/rest.rb +58 -0
  29. data/lib/google/cloud/vector_search/v1/vector_search_service.rb +60 -0
  30. data/lib/google/cloud/vector_search/v1/version.rb +7 -2
  31. data/lib/google/cloud/vector_search/v1.rb +47 -0
  32. data/lib/google/cloud/vectorsearch/v1/common_pb.rb +21 -0
  33. data/lib/google/cloud/vectorsearch/v1/data_object_pb.rb +29 -0
  34. data/lib/google/cloud/vectorsearch/v1/data_object_search_service_pb.rb +53 -0
  35. data/lib/google/cloud/vectorsearch/v1/data_object_search_service_services_pb.rb +51 -0
  36. data/lib/google/cloud/vectorsearch/v1/data_object_service_pb.rb +37 -0
  37. data/lib/google/cloud/vectorsearch/v1/data_object_service_services_pb.rb +57 -0
  38. data/lib/google/cloud/vectorsearch/v1/embedding_config_pb.rb +24 -0
  39. data/lib/google/cloud/vectorsearch/v1/encryption_spec_pb.rb +24 -0
  40. data/lib/google/cloud/vectorsearch/v1/vectorsearch_service_pb.rb +69 -0
  41. data/lib/google/cloud/vectorsearch/v1/vectorsearch_service_services_pb.rb +71 -0
  42. data/lib/google-cloud-vector_search-v1.rb +21 -0
  43. data/proto_docs/README.md +4 -0
  44. data/proto_docs/google/api/client.rb +593 -0
  45. data/proto_docs/google/api/field_behavior.rb +85 -0
  46. data/proto_docs/google/api/field_info.rb +88 -0
  47. data/proto_docs/google/api/launch_stage.rb +71 -0
  48. data/proto_docs/google/api/resource.rb +227 -0
  49. data/proto_docs/google/cloud/vectorsearch/v1/common.rb +38 -0
  50. data/proto_docs/google/cloud/vectorsearch/v1/data_object.rb +104 -0
  51. data/proto_docs/google/cloud/vectorsearch/v1/data_object_search_service.rb +455 -0
  52. data/proto_docs/google/cloud/vectorsearch/v1/data_object_service.rb +156 -0
  53. data/proto_docs/google/cloud/vectorsearch/v1/embedding_config.rb +82 -0
  54. data/proto_docs/google/cloud/vectorsearch/v1/encryption_spec.rb +40 -0
  55. data/proto_docs/google/cloud/vectorsearch/v1/vectorsearch_service.rb +723 -0
  56. data/proto_docs/google/longrunning/operations.rb +191 -0
  57. data/proto_docs/google/protobuf/any.rb +145 -0
  58. data/proto_docs/google/protobuf/duration.rb +98 -0
  59. data/proto_docs/google/protobuf/empty.rb +34 -0
  60. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  61. data/proto_docs/google/protobuf/struct.rb +108 -0
  62. data/proto_docs/google/protobuf/timestamp.rb +128 -0
  63. data/proto_docs/google/rpc/status.rb +48 -0
  64. metadata +122 -9
@@ -0,0 +1,455 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module VectorSearch
23
+ module V1
24
+ # Defines a output fields struct for data in DataObject.
25
+ # @!attribute [rw] data_fields
26
+ # @return [::Array<::String>]
27
+ # Optional. The fields from the data fields to include in the output.
28
+ # @!attribute [rw] vector_fields
29
+ # @return [::Array<::String>]
30
+ # Optional. The fields from the vector fields to include in the output.
31
+ # @!attribute [rw] metadata_fields
32
+ # @return [::Array<::String>]
33
+ # Optional. The fields from the DataObject metadata to include in the output.
34
+ class OutputFields
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+ end
38
+
39
+ # Represents a hint to the search index engine.
40
+ # @!attribute [rw] knn_hint
41
+ # @return [::Google::Cloud::VectorSearch::V1::SearchHint::KnnHint]
42
+ # Optional. If set, the search will use the system's default
43
+ # K-Nearest Neighbor (KNN) index engine.
44
+ #
45
+ # Note: The following fields are mutually exclusive: `knn_hint`, `index_hint`. If a field in that set is populated, all other fields in the set will automatically be cleared.
46
+ # @!attribute [rw] index_hint
47
+ # @return [::Google::Cloud::VectorSearch::V1::SearchHint::IndexHint]
48
+ # Optional. Specifies that the search should use a particular index.
49
+ #
50
+ # Note: The following fields are mutually exclusive: `index_hint`, `knn_hint`. If a field in that set is populated, all other fields in the set will automatically be cleared.
51
+ class SearchHint
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+
55
+ # Message to specify the index to use for the search.
56
+ # @!attribute [rw] dense_scann_params
57
+ # @return [::Google::Cloud::VectorSearch::V1::SearchHint::IndexHint::DenseScannParams]
58
+ # Optional. Dense ScaNN parameters.
59
+ # @!attribute [rw] name
60
+ # @return [::String]
61
+ # Required. The resource name of the index to use for the search.
62
+ # The index must be in the same project, location, and collection.
63
+ # Format:
64
+ # `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
65
+ class IndexHint
66
+ include ::Google::Protobuf::MessageExts
67
+ extend ::Google::Protobuf::MessageExts::ClassMethods
68
+
69
+ # Parameters for dense ScaNN.
70
+ # @!attribute [rw] target_recall
71
+ # @return [::Float]
72
+ # Optional. The target recall for the search. Must be a double in the
73
+ # range [0, 1]. While the search aims to achieve this level of recall, it
74
+ # is not guaranteed.
75
+ class DenseScannParams
76
+ include ::Google::Protobuf::MessageExts
77
+ extend ::Google::Protobuf::MessageExts::ClassMethods
78
+ end
79
+ end
80
+
81
+ # KnnHint will be used if search should be explicitly done on system's
82
+ # default K-Nearest Neighbor (KNN) index engine.
83
+ class KnnHint
84
+ include ::Google::Protobuf::MessageExts
85
+ extend ::Google::Protobuf::MessageExts::ClassMethods
86
+ end
87
+ end
88
+
89
+ # A single search request within a batch operation.
90
+ # @!attribute [rw] vector_search
91
+ # @return [::Google::Cloud::VectorSearch::V1::VectorSearch]
92
+ # A vector-based search.
93
+ #
94
+ # Note: The following fields are mutually exclusive: `vector_search`, `semantic_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
95
+ # @!attribute [rw] semantic_search
96
+ # @return [::Google::Cloud::VectorSearch::V1::SemanticSearch]
97
+ # A semantic search.
98
+ #
99
+ # Note: The following fields are mutually exclusive: `semantic_search`, `vector_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
100
+ # @!attribute [rw] text_search
101
+ # @return [::Google::Cloud::VectorSearch::V1::TextSearch]
102
+ # A text search operation.
103
+ #
104
+ # Note: The following fields are mutually exclusive: `text_search`, `vector_search`, `semantic_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
105
+ class Search
106
+ include ::Google::Protobuf::MessageExts
107
+ extend ::Google::Protobuf::MessageExts::ClassMethods
108
+ end
109
+
110
+ # Defines a search operation using a query vector.
111
+ # @!attribute [rw] vector
112
+ # @return [::Google::Cloud::VectorSearch::V1::DenseVector]
113
+ # A dense vector for the query.
114
+ #
115
+ # Note: The following fields are mutually exclusive: `vector`, `sparse_vector`. If a field in that set is populated, all other fields in the set will automatically be cleared.
116
+ # @!attribute [rw] sparse_vector
117
+ # @return [::Google::Cloud::VectorSearch::V1::SparseVector]
118
+ # A sparse vector for the query.
119
+ #
120
+ # Note: The following fields are mutually exclusive: `sparse_vector`, `vector`. If a field in that set is populated, all other fields in the set will automatically be cleared.
121
+ # @!attribute [rw] search_field
122
+ # @return [::String]
123
+ # Required. The vector field to search.
124
+ # @!attribute [rw] filter
125
+ # @return [::Google::Protobuf::Struct]
126
+ # Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
127
+ # represented as a google.protobuf.Struct.
128
+ # @!attribute [rw] top_k
129
+ # @return [::Integer]
130
+ # Optional. The number of nearest neighbors to return.
131
+ # @!attribute [rw] output_fields
132
+ # @return [::Google::Cloud::VectorSearch::V1::OutputFields]
133
+ # Optional. Mask specifying which fields to return.
134
+ # @!attribute [rw] search_hint
135
+ # @return [::Google::Cloud::VectorSearch::V1::SearchHint]
136
+ # Optional. Sets the search hint. If no strategy is specified, the service
137
+ # will use an index if one is available, and fall back to the default KNN
138
+ # search otherwise.
139
+ # @!attribute [rw] distance_metric
140
+ # @return [::Google::Cloud::VectorSearch::V1::DistanceMetric]
141
+ # Optional. The distance metric to use for the KNN search. If not specified,
142
+ # DOT_PRODUCT will be used as the default.
143
+ class VectorSearch
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+ end
147
+
148
+ # Defines a semantic search operation.
149
+ # @!attribute [rw] search_text
150
+ # @return [::String]
151
+ # Optional. The query text, which is used to generate an embedding according
152
+ # to the embedding model specified in the collection config.
153
+ #
154
+ # Required when using the text search mode.
155
+ # @!attribute [rw] search_field
156
+ # @return [::String]
157
+ # Required. The vector field to search.
158
+ # @!attribute [rw] task_type
159
+ # @return [::Google::Cloud::VectorSearch::V1::EmbeddingTaskType]
160
+ # Optional. The task type of the query embedding. Must be specified for
161
+ # text-only embedding models, see
162
+ # <https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/task-types>
163
+ # Not needed for multi modal embedding models, see
164
+ # <https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/get-multimodal-embeddings#specify-task-instructions>
165
+ # @!attribute [rw] output_fields
166
+ # @return [::Google::Cloud::VectorSearch::V1::OutputFields]
167
+ # Optional. The fields to return in the search results.
168
+ # @!attribute [rw] filter
169
+ # @return [::Google::Protobuf::Struct]
170
+ # Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
171
+ # represented as a google.protobuf.Struct.
172
+ # @!attribute [rw] top_k
173
+ # @return [::Integer]
174
+ # Optional. The number of data objects to return.
175
+ # @!attribute [rw] search_hint
176
+ # @return [::Google::Cloud::VectorSearch::V1::SearchHint]
177
+ # Optional. Sets the search hint. If no strategy is specified, the service
178
+ # will use an index if one is available, and fall back to KNN search
179
+ # otherwise.
180
+ class SemanticSearch
181
+ include ::Google::Protobuf::MessageExts
182
+ extend ::Google::Protobuf::MessageExts::ClassMethods
183
+ end
184
+
185
+ # Defines a text search operation.
186
+ # @!attribute [rw] search_text
187
+ # @return [::String]
188
+ # Optional. The query text. Required when using the default text search mode.
189
+ # @!attribute [rw] data_field_names
190
+ # @return [::Array<::String>]
191
+ # Optional. The data field names to search. Required when using the default
192
+ # text search mode.
193
+ # @!attribute [rw] output_fields
194
+ # @return [::Google::Cloud::VectorSearch::V1::OutputFields]
195
+ # Optional. The fields to return in the search results.
196
+ # @!attribute [rw] top_k
197
+ # @return [::Integer]
198
+ # Optional. The number of results to return.
199
+ # @!attribute [rw] filter
200
+ # @return [::Google::Protobuf::Struct]
201
+ # Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`,
202
+ # represented as a `google.protobuf.Struct`.
203
+ class TextSearch
204
+ include ::Google::Protobuf::MessageExts
205
+ extend ::Google::Protobuf::MessageExts::ClassMethods
206
+ end
207
+
208
+ # Request for performing a single search.
209
+ # @!attribute [rw] vector_search
210
+ # @return [::Google::Cloud::VectorSearch::V1::VectorSearch]
211
+ # A vector search operation.
212
+ #
213
+ # Note: The following fields are mutually exclusive: `vector_search`, `semantic_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
214
+ # @!attribute [rw] semantic_search
215
+ # @return [::Google::Cloud::VectorSearch::V1::SemanticSearch]
216
+ # A semantic search operation.
217
+ #
218
+ # Note: The following fields are mutually exclusive: `semantic_search`, `vector_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
219
+ # @!attribute [rw] text_search
220
+ # @return [::Google::Cloud::VectorSearch::V1::TextSearch]
221
+ # Optional. A text search operation.
222
+ #
223
+ # Note: The following fields are mutually exclusive: `text_search`, `vector_search`, `semantic_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
224
+ # @!attribute [rw] parent
225
+ # @return [::String]
226
+ # Required. The resource name of the Collection for which to search.
227
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`
228
+ # @!attribute [rw] page_size
229
+ # @return [::Integer]
230
+ # Optional. The standard list page size. Only supported for KNN. If not set,
231
+ # up to search_type.top_k results will be returned. The maximum value is
232
+ # 1000; values above 1000 will be coerced to 1000.
233
+ # @!attribute [rw] page_token
234
+ # @return [::String]
235
+ # Optional. The standard list page token.
236
+ # Typically obtained via
237
+ # {::Google::Cloud::VectorSearch::V1::SearchDataObjectsResponse#next_page_token SearchDataObjectsResponse.next_page_token}
238
+ # of the previous
239
+ # {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#search_data_objects DataObjectSearchService.SearchDataObjects}
240
+ # call.
241
+ class SearchDataObjectsRequest
242
+ include ::Google::Protobuf::MessageExts
243
+ extend ::Google::Protobuf::MessageExts::ClassMethods
244
+ end
245
+
246
+ # A single search result.
247
+ # @!attribute [r] data_object
248
+ # @return [::Google::Cloud::VectorSearch::V1::DataObject]
249
+ # Output only. The matching data object.
250
+ # @!attribute [r] distance
251
+ # @return [::Float]
252
+ # Output only. Similarity distance or ranker score returned by
253
+ # BatchSearchDataObjects.
254
+ class SearchResult
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
+ end
258
+
259
+ # Response for a search request.
260
+ # @!attribute [r] results
261
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::SearchResult>]
262
+ # Output only. The list of dataObjects that match the search criteria.
263
+ # @!attribute [r] next_page_token
264
+ # @return [::String]
265
+ # Output only. A token to retrieve next page of results.
266
+ # Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to
267
+ # obtain that page.
268
+ class SearchDataObjectsResponse
269
+ include ::Google::Protobuf::MessageExts
270
+ extend ::Google::Protobuf::MessageExts::ClassMethods
271
+ end
272
+
273
+ # Request message for
274
+ # {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#aggregate_data_objects DataObjectSearchService.AggregateDataObjects}.
275
+ # @!attribute [rw] parent
276
+ # @return [::String]
277
+ # Required. The resource name of the Collection for which to query.
278
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`
279
+ # @!attribute [rw] filter
280
+ # @return [::Google::Protobuf::Struct]
281
+ # Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
282
+ # represented as a google.protobuf.Struct.
283
+ # @!attribute [rw] aggregate
284
+ # @return [::Google::Cloud::VectorSearch::V1::AggregationMethod]
285
+ # Required. The aggregation method to apply to the query.
286
+ class AggregateDataObjectsRequest
287
+ include ::Google::Protobuf::MessageExts
288
+ extend ::Google::Protobuf::MessageExts::ClassMethods
289
+ end
290
+
291
+ # Response message for
292
+ # {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#aggregate_data_objects DataObjectSearchService.AggregateDataObjects}.
293
+ # @!attribute [r] aggregate_results
294
+ # @return [::Array<::Google::Protobuf::Struct>]
295
+ # Output only. The aggregated results of the query.
296
+ class AggregateDataObjectsResponse
297
+ include ::Google::Protobuf::MessageExts
298
+ extend ::Google::Protobuf::MessageExts::ClassMethods
299
+ end
300
+
301
+ # Request message for
302
+ # {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#query_data_objects DataObjectSearchService.QueryDataObjects}.
303
+ # @!attribute [rw] parent
304
+ # @return [::String]
305
+ # Required. The resource name of the Collection for which to query.
306
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`
307
+ # @!attribute [rw] filter
308
+ # @return [::Google::Protobuf::Struct]
309
+ # Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
310
+ # represented as a google.protobuf.Struct.
311
+ # @!attribute [rw] output_fields
312
+ # @return [::Google::Cloud::VectorSearch::V1::OutputFields]
313
+ # Optional. Mask specifying which fields to return.
314
+ # @!attribute [rw] page_size
315
+ # @return [::Integer]
316
+ # Optional. The standard list page size. Default is 100.
317
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
318
+ # @!attribute [rw] page_token
319
+ # @return [::String]
320
+ # Optional. The standard list page token.
321
+ # Typically obtained via
322
+ # {::Google::Cloud::VectorSearch::V1::QueryDataObjectsResponse#next_page_token QueryDataObjectsResponse.next_page_token}
323
+ # of the previous
324
+ # {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#query_data_objects DataObjectSearchService.QueryDataObjects}
325
+ # call.
326
+ class QueryDataObjectsRequest
327
+ include ::Google::Protobuf::MessageExts
328
+ extend ::Google::Protobuf::MessageExts::ClassMethods
329
+ end
330
+
331
+ # Response message for
332
+ # {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#query_data_objects DataObjectSearchService.QueryDataObjects}.
333
+ # @!attribute [r] data_objects
334
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::DataObject>]
335
+ # Output only. The list of dataObjects that match the query.
336
+ # @!attribute [r] next_page_token
337
+ # @return [::String]
338
+ # Output only. A token to retrieve next page of results.
339
+ # Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to
340
+ # obtain that page.
341
+ class QueryDataObjectsResponse
342
+ include ::Google::Protobuf::MessageExts
343
+ extend ::Google::Protobuf::MessageExts::ClassMethods
344
+ end
345
+
346
+ # A request to perform a batch of search operations.
347
+ # @!attribute [rw] parent
348
+ # @return [::String]
349
+ # Required. The resource name of the Collection for which to search.
350
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`
351
+ # @!attribute [rw] searches
352
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::Search>]
353
+ # Required. A list of search requests to execute in parallel.
354
+ # @!attribute [rw] combine
355
+ # @return [::Google::Cloud::VectorSearch::V1::BatchSearchDataObjectsRequest::CombineResultsOptions]
356
+ # Optional. Options for combining the results of the batch search operations.
357
+ class BatchSearchDataObjectsRequest
358
+ include ::Google::Protobuf::MessageExts
359
+ extend ::Google::Protobuf::MessageExts::ClassMethods
360
+
361
+ # Options for combining the results of the batch search operations.
362
+ # @!attribute [rw] ranker
363
+ # @return [::Google::Cloud::VectorSearch::V1::Ranker]
364
+ # Required. The ranker to use for combining the results.
365
+ # @!attribute [rw] output_fields
366
+ # @return [::Google::Cloud::VectorSearch::V1::OutputFields]
367
+ # Optional. Mask specifying which fields to return.
368
+ # @!attribute [rw] top_k
369
+ # @return [::Integer]
370
+ # Optional. The number of results to return. If not set, a default value
371
+ # will be used.
372
+ class CombineResultsOptions
373
+ include ::Google::Protobuf::MessageExts
374
+ extend ::Google::Protobuf::MessageExts::ClassMethods
375
+ end
376
+ end
377
+
378
+ # Defines a ranker to combine results from multiple searches.
379
+ # @!attribute [rw] rrf
380
+ # @return [::Google::Cloud::VectorSearch::V1::ReciprocalRankFusion]
381
+ # Reciprocal Rank Fusion ranking.
382
+ # @!attribute [rw] vertex_ranker
383
+ # @return [::Google::Cloud::VectorSearch::V1::VertexRanker]
384
+ # Optional. Vertex AI ranking.
385
+ class Ranker
386
+ include ::Google::Protobuf::MessageExts
387
+ extend ::Google::Protobuf::MessageExts::ClassMethods
388
+ end
389
+
390
+ # Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
391
+ # @!attribute [rw] weights
392
+ # @return [::Array<::Float>]
393
+ # Required. The weights to apply to each search result set during fusion.
394
+ class ReciprocalRankFusion
395
+ include ::Google::Protobuf::MessageExts
396
+ extend ::Google::Protobuf::MessageExts::ClassMethods
397
+ end
398
+
399
+ # Defines a ranker using the Vertex AI ranking service.
400
+ # See <https://cloud.google.com/generative-ai-app-builder/docs/ranking> for
401
+ # details.
402
+ # @!attribute [rw] text_record_spec
403
+ # @return [::Google::Cloud::VectorSearch::V1::VertexRanker::TextRecordSpec]
404
+ # The record spec for text search.
405
+ # @!attribute [rw] model
406
+ # @return [::String]
407
+ # Required. The model used for ranking documents. The list of available
408
+ # models is described in
409
+ # <https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models>.
410
+ # Currently, only `semantic-ranker-fast@latest` is supported.
411
+ # @!attribute [rw] top_n
412
+ # @return [::Integer]
413
+ # Required. The number of documents to be processed for ranking.
414
+ class VertexRanker
415
+ include ::Google::Protobuf::MessageExts
416
+ extend ::Google::Protobuf::MessageExts::ClassMethods
417
+
418
+ # The record spec for text search.
419
+ # @!attribute [rw] query
420
+ # @return [::String]
421
+ # Required. The query against which the records are ranked and scored.
422
+ # @!attribute [rw] title_template
423
+ # @return [::String]
424
+ # Optional. The template used to generate the record's title.
425
+ # @!attribute [rw] content_template
426
+ # @return [::String]
427
+ # Optional. The template used to generate the record's content.
428
+ class TextRecordSpec
429
+ include ::Google::Protobuf::MessageExts
430
+ extend ::Google::Protobuf::MessageExts::ClassMethods
431
+ end
432
+ end
433
+
434
+ # A response from a batch search operation.
435
+ # @!attribute [r] results
436
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::SearchDataObjectsResponse>]
437
+ # Output only. A list of search responses, one for each request in the batch.
438
+ # If a ranker is used, a single ranked list of results is returned.
439
+ class BatchSearchDataObjectsResponse
440
+ include ::Google::Protobuf::MessageExts
441
+ extend ::Google::Protobuf::MessageExts::ClassMethods
442
+ end
443
+
444
+ # Aggregation methods.
445
+ module AggregationMethod
446
+ # Should not be used.
447
+ AGGREGATION_METHOD_UNSPECIFIED = 0
448
+
449
+ # Count the number of data objects that match the filter.
450
+ COUNT = 1
451
+ end
452
+ end
453
+ end
454
+ end
455
+ end
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module VectorSearch
23
+ module V1
24
+ # Request message for
25
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#create_data_object DataObjectService.CreateDataObject}.
26
+ # @!attribute [rw] parent
27
+ # @return [::String]
28
+ # Required. The resource name of the Collection to create the DataObject in.
29
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`
30
+ # @!attribute [rw] data_object_id
31
+ # @return [::String]
32
+ # Required. The id of the dataObject to create.
33
+ # The id must be 1-63 characters long, and comply with
34
+ # [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
35
+ # Specifically, it must be 1-63 characters long and match the regular
36
+ # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
37
+ # @!attribute [rw] data_object
38
+ # @return [::Google::Cloud::VectorSearch::V1::DataObject]
39
+ # Required. The DataObject to create.
40
+ class CreateDataObjectRequest
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+ end
44
+
45
+ # Request message for
46
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_create_data_objects DataObjectService.BatchCreateDataObjects}.
47
+ # @!attribute [rw] parent
48
+ # @return [::String]
49
+ # Required. The resource name of the Collection to create the DataObjects in.
50
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`.
51
+ # The parent field in the CreateDataObjectRequest messages must match this
52
+ # field.
53
+ # @!attribute [rw] requests
54
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest>]
55
+ # Required. The request message specifying the resources to create.
56
+ # A maximum of 1000 DataObjects can be created in a batch.
57
+ class BatchCreateDataObjectsRequest
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # Response message for
63
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_create_data_objects DataObjectService.BatchCreateDataObjects}.
64
+ # @!attribute [r] data_objects
65
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::DataObject>]
66
+ # Output only. DataObjects created.
67
+ class BatchCreateDataObjectsResponse
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # Request message for
73
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#get_data_object DataObjectService.GetDataObject}.
74
+ # @!attribute [rw] name
75
+ # @return [::String]
76
+ # Required. The name of the DataObject resource.
77
+ # Format:
78
+ # `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
79
+ class GetDataObjectRequest
80
+ include ::Google::Protobuf::MessageExts
81
+ extend ::Google::Protobuf::MessageExts::ClassMethods
82
+ end
83
+
84
+ # Request message for
85
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#update_data_object DataObjectService.UpdateDataObject}.
86
+ # @!attribute [rw] data_object
87
+ # @return [::Google::Cloud::VectorSearch::V1::DataObject]
88
+ # Required. The DataObject which replaces the resource on the server.
89
+ # @!attribute [rw] update_mask
90
+ # @return [::Google::Protobuf::FieldMask]
91
+ # Optional. The update mask applies to the resource. See
92
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
93
+ class UpdateDataObjectRequest
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Request message for
99
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_update_data_objects DataObjectService.BatchUpdateDataObjects}.
100
+ # @!attribute [rw] parent
101
+ # @return [::String]
102
+ # Required. The resource name of the Collection to update the DataObjects in.
103
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`.
104
+ # The parent field in the UpdateDataObjectRequest messages must match this
105
+ # field.
106
+ # @!attribute [rw] requests
107
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest>]
108
+ # Required. The request message specifying the resources to update.
109
+ # A maximum of 1000 DataObjects can be updated in a batch.
110
+ class BatchUpdateDataObjectsRequest
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+
115
+ # Response message for
116
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_update_data_objects DataObjectService.BatchUpdateDataObjects}.
117
+ class BatchUpdateDataObjectsResponse
118
+ include ::Google::Protobuf::MessageExts
119
+ extend ::Google::Protobuf::MessageExts::ClassMethods
120
+ end
121
+
122
+ # Request message for
123
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#delete_data_object DataObjectService.DeleteDataObject}.
124
+ # @!attribute [rw] name
125
+ # @return [::String]
126
+ # Required. The name of the DataObject resource to be deleted.
127
+ # Format:
128
+ # `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
129
+ # @!attribute [rw] etag
130
+ # @return [::String]
131
+ # Optional. The current etag of the DataObject.
132
+ # If an etag is provided and does not match the current etag of the
133
+ # DataObject, deletion will be blocked and an ABORTED error will be returned.
134
+ class DeleteDataObjectRequest
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+ end
138
+
139
+ # Request message for
140
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_delete_data_objects DataObjectService.BatchDeleteDataObjects}.
141
+ # @!attribute [rw] parent
142
+ # @return [::String]
143
+ # Required. The resource name of the Collection to delete the DataObjects in.
144
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`.
145
+ # @!attribute [rw] requests
146
+ # @return [::Array<::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest>]
147
+ # Required. The request message specifying the resources to delete.
148
+ # A maximum of 1000 DataObjects can be deleted in a batch.
149
+ class BatchDeleteDataObjectsRequest
150
+ include ::Google::Protobuf::MessageExts
151
+ extend ::Google::Protobuf::MessageExts::ClassMethods
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end