google-cloud-vector_search-v1 0.a → 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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -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 +50 -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 +397 -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 +76 -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 +127 -0
  63. data/proto_docs/google/rpc/status.rb +48 -0
  64. metadata +122 -9
@@ -0,0 +1,1031 @@
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
+ require "google/cloud/errors"
20
+ require "google/cloud/vectorsearch/v1/data_object_service_pb"
21
+ require "google/cloud/vector_search/v1/data_object_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module VectorSearch
27
+ module V1
28
+ module DataObjectService
29
+ module Rest
30
+ ##
31
+ # REST client for the DataObjectService service.
32
+ #
33
+ # Service for creating and managing data objects.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "vectorsearch.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :data_object_service_stub
46
+
47
+ ##
48
+ # Configure the DataObjectService Client class.
49
+ #
50
+ # See {::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all DataObjectService clients
56
+ # ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "VectorSearch", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.create_data_object.timeout = 60.0
77
+ default_config.rpcs.create_data_object.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config.rpcs.batch_create_data_objects.timeout = 300.0
82
+ default_config.rpcs.batch_create_data_objects.retry_policy = {
83
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
84
+ }
85
+
86
+ default_config.rpcs.get_data_object.timeout = 60.0
87
+ default_config.rpcs.get_data_object.retry_policy = {
88
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
89
+ }
90
+
91
+ default_config.rpcs.update_data_object.timeout = 60.0
92
+ default_config.rpcs.update_data_object.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.batch_update_data_objects.timeout = 60.0
97
+ default_config.rpcs.batch_update_data_objects.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.delete_data_object.timeout = 60.0
102
+ default_config.rpcs.delete_data_object.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.batch_delete_data_objects.timeout = 60.0
107
+ default_config.rpcs.batch_delete_data_objects.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config
112
+ end
113
+ yield @configure if block_given?
114
+ @configure
115
+ end
116
+
117
+ ##
118
+ # Configure the DataObjectService Client instance.
119
+ #
120
+ # The configuration is set to the derived mode, meaning that values can be changed,
121
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
122
+ # should be made on {Client.configure}.
123
+ #
124
+ # See {::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client::Configuration}
125
+ # for a description of the configuration fields.
126
+ #
127
+ # @yield [config] Configure the Client client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ # @return [Client::Configuration]
131
+ #
132
+ def configure
133
+ yield @config if block_given?
134
+ @config
135
+ end
136
+
137
+ ##
138
+ # The effective universe domain
139
+ #
140
+ # @return [String]
141
+ #
142
+ def universe_domain
143
+ @data_object_service_stub.universe_domain
144
+ end
145
+
146
+ ##
147
+ # Create a new DataObjectService REST client object.
148
+ #
149
+ # @example
150
+ #
151
+ # # Create a client using the default configuration
152
+ # client = ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
153
+ #
154
+ # # Create a client using a custom configuration
155
+ # client = ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new do |config|
156
+ # config.timeout = 10.0
157
+ # end
158
+ #
159
+ # @yield [config] Configure the DataObjectService client.
160
+ # @yieldparam config [Client::Configuration]
161
+ #
162
+ def initialize
163
+ # Create the configuration object
164
+ @config = Configuration.new Client.configure
165
+
166
+ # Yield the configuration if needed
167
+ yield @config if block_given?
168
+
169
+ # Create credentials
170
+ credentials = @config.credentials
171
+ # Use self-signed JWT if the endpoint is unchanged from default,
172
+ # but only if the default endpoint does not have a region prefix.
173
+ enable_self_signed_jwt = @config.endpoint.nil? ||
174
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
175
+ !@config.endpoint.split(".").first.include?("-"))
176
+ credentials ||= Credentials.default scope: @config.scope,
177
+ enable_self_signed_jwt: enable_self_signed_jwt
178
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
179
+ credentials = Credentials.new credentials, scope: @config.scope
180
+ end
181
+
182
+ @quota_project_id = @config.quota_project
183
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
184
+
185
+ @data_object_service_stub = ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::ServiceStub.new(
186
+ endpoint: @config.endpoint,
187
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
188
+ universe_domain: @config.universe_domain,
189
+ credentials: credentials,
190
+ logger: @config.logger
191
+ )
192
+
193
+ @data_object_service_stub.logger(stub: true)&.info do |entry|
194
+ entry.set_system_name
195
+ entry.set_service
196
+ entry.message = "Created client for #{entry.service}"
197
+ entry.set_credentials_fields credentials
198
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
199
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
200
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
201
+ end
202
+
203
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
204
+ config.credentials = credentials
205
+ config.quota_project = @quota_project_id
206
+ config.endpoint = @data_object_service_stub.endpoint
207
+ config.universe_domain = @data_object_service_stub.universe_domain
208
+ config.bindings_override = @config.bindings_override
209
+ config.logger = @data_object_service_stub.logger if config.respond_to? :logger=
210
+ end
211
+ end
212
+
213
+ ##
214
+ # Get the associated client for mix-in of the Locations.
215
+ #
216
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
217
+ #
218
+ attr_reader :location_client
219
+
220
+ ##
221
+ # The logger used for request/response debug logging.
222
+ #
223
+ # @return [Logger]
224
+ #
225
+ def logger
226
+ @data_object_service_stub.logger
227
+ end
228
+
229
+ # Service calls
230
+
231
+ ##
232
+ # Creates a dataObject.
233
+ #
234
+ # @overload create_data_object(request, options = nil)
235
+ # Pass arguments to `create_data_object` via a request object, either of type
236
+ # {::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest} or an equivalent Hash.
237
+ #
238
+ # @param request [::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest, ::Hash]
239
+ # A request object representing the call parameters. Required. To specify no
240
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
241
+ # @param options [::Gapic::CallOptions, ::Hash]
242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
243
+ #
244
+ # @overload create_data_object(parent: nil, data_object_id: nil, data_object: nil)
245
+ # Pass arguments to `create_data_object` via keyword arguments. Note that at
246
+ # least one keyword argument is required. To specify no parameters, or to keep all
247
+ # the default parameter values, pass an empty Hash as a request object (see above).
248
+ #
249
+ # @param parent [::String]
250
+ # Required. The resource name of the Collection to create the DataObject in.
251
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`
252
+ # @param data_object_id [::String]
253
+ # Required. The id of the dataObject to create.
254
+ # The id must be 1-63 characters long, and comply with
255
+ # [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
256
+ # Specifically, it must be 1-63 characters long and match the regular
257
+ # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
258
+ # @param data_object [::Google::Cloud::VectorSearch::V1::DataObject, ::Hash]
259
+ # Required. The DataObject to create.
260
+ # @yield [result, operation] Access the result along with the TransportOperation object
261
+ # @yieldparam result [::Google::Cloud::VectorSearch::V1::DataObject]
262
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
263
+ #
264
+ # @return [::Google::Cloud::VectorSearch::V1::DataObject]
265
+ #
266
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
267
+ #
268
+ # @example Basic example
269
+ # require "google/cloud/vector_search/v1"
270
+ #
271
+ # # Create a client object. The client can be reused for multiple calls.
272
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
273
+ #
274
+ # # Create a request. To set request fields, pass in keyword arguments.
275
+ # request = Google::Cloud::VectorSearch::V1::CreateDataObjectRequest.new
276
+ #
277
+ # # Call the create_data_object method.
278
+ # result = client.create_data_object request
279
+ #
280
+ # # The returned object is of type Google::Cloud::VectorSearch::V1::DataObject.
281
+ # p result
282
+ #
283
+ def create_data_object request, options = nil
284
+ raise ::ArgumentError, "request must be provided" if request.nil?
285
+
286
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest
287
+
288
+ # Converts hash and nil to an options object
289
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
290
+
291
+ # Customize the options with defaults
292
+ call_metadata = @config.rpcs.create_data_object.metadata.to_h
293
+
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
295
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
296
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
297
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
298
+ transports_version_send: [:rest]
299
+
300
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
301
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
302
+
303
+ options.apply_defaults timeout: @config.rpcs.create_data_object.timeout,
304
+ metadata: call_metadata,
305
+ retry_policy: @config.rpcs.create_data_object.retry_policy
306
+
307
+ options.apply_defaults timeout: @config.timeout,
308
+ metadata: @config.metadata,
309
+ retry_policy: @config.retry_policy
310
+
311
+ @data_object_service_stub.create_data_object request, options do |result, operation|
312
+ yield result, operation if block_given?
313
+ end
314
+ rescue ::Gapic::Rest::Error => e
315
+ raise ::Google::Cloud::Error.from_error(e)
316
+ end
317
+
318
+ ##
319
+ # Creates a batch of dataObjects.
320
+ #
321
+ # @overload batch_create_data_objects(request, options = nil)
322
+ # Pass arguments to `batch_create_data_objects` via a request object, either of type
323
+ # {::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsRequest} or an equivalent Hash.
324
+ #
325
+ # @param request [::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsRequest, ::Hash]
326
+ # A request object representing the call parameters. Required. To specify no
327
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
328
+ # @param options [::Gapic::CallOptions, ::Hash]
329
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
330
+ #
331
+ # @overload batch_create_data_objects(parent: nil, requests: nil)
332
+ # Pass arguments to `batch_create_data_objects` via keyword arguments. Note that at
333
+ # least one keyword argument is required. To specify no parameters, or to keep all
334
+ # the default parameter values, pass an empty Hash as a request object (see above).
335
+ #
336
+ # @param parent [::String]
337
+ # Required. The resource name of the Collection to create the DataObjects in.
338
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`.
339
+ # The parent field in the CreateDataObjectRequest messages must match this
340
+ # field.
341
+ # @param requests [::Array<::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest, ::Hash>]
342
+ # Required. The request message specifying the resources to create.
343
+ # A maximum of 1000 DataObjects can be created in a batch.
344
+ # @yield [result, operation] Access the result along with the TransportOperation object
345
+ # @yieldparam result [::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponse]
346
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
347
+ #
348
+ # @return [::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponse]
349
+ #
350
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
351
+ #
352
+ # @example Basic example
353
+ # require "google/cloud/vector_search/v1"
354
+ #
355
+ # # Create a client object. The client can be reused for multiple calls.
356
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
357
+ #
358
+ # # Create a request. To set request fields, pass in keyword arguments.
359
+ # request = Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsRequest.new
360
+ #
361
+ # # Call the batch_create_data_objects method.
362
+ # result = client.batch_create_data_objects request
363
+ #
364
+ # # The returned object is of type Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponse.
365
+ # p result
366
+ #
367
+ def batch_create_data_objects request, options = nil
368
+ raise ::ArgumentError, "request must be provided" if request.nil?
369
+
370
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsRequest
371
+
372
+ # Converts hash and nil to an options object
373
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
374
+
375
+ # Customize the options with defaults
376
+ call_metadata = @config.rpcs.batch_create_data_objects.metadata.to_h
377
+
378
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
379
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
380
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
381
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
382
+ transports_version_send: [:rest]
383
+
384
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
385
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
386
+
387
+ options.apply_defaults timeout: @config.rpcs.batch_create_data_objects.timeout,
388
+ metadata: call_metadata,
389
+ retry_policy: @config.rpcs.batch_create_data_objects.retry_policy
390
+
391
+ options.apply_defaults timeout: @config.timeout,
392
+ metadata: @config.metadata,
393
+ retry_policy: @config.retry_policy
394
+
395
+ @data_object_service_stub.batch_create_data_objects request, options do |result, operation|
396
+ yield result, operation if block_given?
397
+ end
398
+ rescue ::Gapic::Rest::Error => e
399
+ raise ::Google::Cloud::Error.from_error(e)
400
+ end
401
+
402
+ ##
403
+ # Gets a data object.
404
+ #
405
+ # @overload get_data_object(request, options = nil)
406
+ # Pass arguments to `get_data_object` via a request object, either of type
407
+ # {::Google::Cloud::VectorSearch::V1::GetDataObjectRequest} or an equivalent Hash.
408
+ #
409
+ # @param request [::Google::Cloud::VectorSearch::V1::GetDataObjectRequest, ::Hash]
410
+ # A request object representing the call parameters. Required. To specify no
411
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
412
+ # @param options [::Gapic::CallOptions, ::Hash]
413
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
414
+ #
415
+ # @overload get_data_object(name: nil)
416
+ # Pass arguments to `get_data_object` via keyword arguments. Note that at
417
+ # least one keyword argument is required. To specify no parameters, or to keep all
418
+ # the default parameter values, pass an empty Hash as a request object (see above).
419
+ #
420
+ # @param name [::String]
421
+ # Required. The name of the DataObject resource.
422
+ # Format:
423
+ # `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
424
+ # @yield [result, operation] Access the result along with the TransportOperation object
425
+ # @yieldparam result [::Google::Cloud::VectorSearch::V1::DataObject]
426
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
427
+ #
428
+ # @return [::Google::Cloud::VectorSearch::V1::DataObject]
429
+ #
430
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
431
+ #
432
+ # @example Basic example
433
+ # require "google/cloud/vector_search/v1"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Cloud::VectorSearch::V1::GetDataObjectRequest.new
440
+ #
441
+ # # Call the get_data_object method.
442
+ # result = client.get_data_object request
443
+ #
444
+ # # The returned object is of type Google::Cloud::VectorSearch::V1::DataObject.
445
+ # p result
446
+ #
447
+ def get_data_object request, options = nil
448
+ raise ::ArgumentError, "request must be provided" if request.nil?
449
+
450
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::GetDataObjectRequest
451
+
452
+ # Converts hash and nil to an options object
453
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
454
+
455
+ # Customize the options with defaults
456
+ call_metadata = @config.rpcs.get_data_object.metadata.to_h
457
+
458
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
459
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
460
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
461
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
462
+ transports_version_send: [:rest]
463
+
464
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
465
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
466
+
467
+ options.apply_defaults timeout: @config.rpcs.get_data_object.timeout,
468
+ metadata: call_metadata,
469
+ retry_policy: @config.rpcs.get_data_object.retry_policy
470
+
471
+ options.apply_defaults timeout: @config.timeout,
472
+ metadata: @config.metadata,
473
+ retry_policy: @config.retry_policy
474
+
475
+ @data_object_service_stub.get_data_object request, options do |result, operation|
476
+ yield result, operation if block_given?
477
+ end
478
+ rescue ::Gapic::Rest::Error => e
479
+ raise ::Google::Cloud::Error.from_error(e)
480
+ end
481
+
482
+ ##
483
+ # Updates a dataObject.
484
+ #
485
+ # @overload update_data_object(request, options = nil)
486
+ # Pass arguments to `update_data_object` via a request object, either of type
487
+ # {::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest} or an equivalent Hash.
488
+ #
489
+ # @param request [::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest, ::Hash]
490
+ # A request object representing the call parameters. Required. To specify no
491
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
492
+ # @param options [::Gapic::CallOptions, ::Hash]
493
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
494
+ #
495
+ # @overload update_data_object(data_object: nil, update_mask: nil)
496
+ # Pass arguments to `update_data_object` via keyword arguments. Note that at
497
+ # least one keyword argument is required. To specify no parameters, or to keep all
498
+ # the default parameter values, pass an empty Hash as a request object (see above).
499
+ #
500
+ # @param data_object [::Google::Cloud::VectorSearch::V1::DataObject, ::Hash]
501
+ # Required. The DataObject which replaces the resource on the server.
502
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
503
+ # Optional. The update mask applies to the resource. See
504
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
505
+ # @yield [result, operation] Access the result along with the TransportOperation object
506
+ # @yieldparam result [::Google::Cloud::VectorSearch::V1::DataObject]
507
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
508
+ #
509
+ # @return [::Google::Cloud::VectorSearch::V1::DataObject]
510
+ #
511
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
512
+ #
513
+ # @example Basic example
514
+ # require "google/cloud/vector_search/v1"
515
+ #
516
+ # # Create a client object. The client can be reused for multiple calls.
517
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
518
+ #
519
+ # # Create a request. To set request fields, pass in keyword arguments.
520
+ # request = Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest.new
521
+ #
522
+ # # Call the update_data_object method.
523
+ # result = client.update_data_object request
524
+ #
525
+ # # The returned object is of type Google::Cloud::VectorSearch::V1::DataObject.
526
+ # p result
527
+ #
528
+ def update_data_object request, options = nil
529
+ raise ::ArgumentError, "request must be provided" if request.nil?
530
+
531
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest
532
+
533
+ # Converts hash and nil to an options object
534
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
535
+
536
+ # Customize the options with defaults
537
+ call_metadata = @config.rpcs.update_data_object.metadata.to_h
538
+
539
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
540
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
541
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
542
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
543
+ transports_version_send: [:rest]
544
+
545
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
546
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
547
+
548
+ options.apply_defaults timeout: @config.rpcs.update_data_object.timeout,
549
+ metadata: call_metadata,
550
+ retry_policy: @config.rpcs.update_data_object.retry_policy
551
+
552
+ options.apply_defaults timeout: @config.timeout,
553
+ metadata: @config.metadata,
554
+ retry_policy: @config.retry_policy
555
+
556
+ @data_object_service_stub.update_data_object request, options do |result, operation|
557
+ yield result, operation if block_given?
558
+ end
559
+ rescue ::Gapic::Rest::Error => e
560
+ raise ::Google::Cloud::Error.from_error(e)
561
+ end
562
+
563
+ ##
564
+ # Updates dataObjects in a batch.
565
+ #
566
+ # @overload batch_update_data_objects(request, options = nil)
567
+ # Pass arguments to `batch_update_data_objects` via a request object, either of type
568
+ # {::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsRequest} or an equivalent Hash.
569
+ #
570
+ # @param request [::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsRequest, ::Hash]
571
+ # A request object representing the call parameters. Required. To specify no
572
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
573
+ # @param options [::Gapic::CallOptions, ::Hash]
574
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
575
+ #
576
+ # @overload batch_update_data_objects(parent: nil, requests: nil)
577
+ # Pass arguments to `batch_update_data_objects` via keyword arguments. Note that at
578
+ # least one keyword argument is required. To specify no parameters, or to keep all
579
+ # the default parameter values, pass an empty Hash as a request object (see above).
580
+ #
581
+ # @param parent [::String]
582
+ # Required. The resource name of the Collection to update the DataObjects in.
583
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`.
584
+ # The parent field in the UpdateDataObjectRequest messages must match this
585
+ # field.
586
+ # @param requests [::Array<::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest, ::Hash>]
587
+ # Required. The request message specifying the resources to update.
588
+ # A maximum of 1000 DataObjects can be updated in a batch.
589
+ # @yield [result, operation] Access the result along with the TransportOperation object
590
+ # @yieldparam result [::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponse]
591
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
592
+ #
593
+ # @return [::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponse]
594
+ #
595
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
596
+ #
597
+ # @example Basic example
598
+ # require "google/cloud/vector_search/v1"
599
+ #
600
+ # # Create a client object. The client can be reused for multiple calls.
601
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
602
+ #
603
+ # # Create a request. To set request fields, pass in keyword arguments.
604
+ # request = Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsRequest.new
605
+ #
606
+ # # Call the batch_update_data_objects method.
607
+ # result = client.batch_update_data_objects request
608
+ #
609
+ # # The returned object is of type Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponse.
610
+ # p result
611
+ #
612
+ def batch_update_data_objects request, options = nil
613
+ raise ::ArgumentError, "request must be provided" if request.nil?
614
+
615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsRequest
616
+
617
+ # Converts hash and nil to an options object
618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
619
+
620
+ # Customize the options with defaults
621
+ call_metadata = @config.rpcs.batch_update_data_objects.metadata.to_h
622
+
623
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
624
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
626
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
627
+ transports_version_send: [:rest]
628
+
629
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
630
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
+
632
+ options.apply_defaults timeout: @config.rpcs.batch_update_data_objects.timeout,
633
+ metadata: call_metadata,
634
+ retry_policy: @config.rpcs.batch_update_data_objects.retry_policy
635
+
636
+ options.apply_defaults timeout: @config.timeout,
637
+ metadata: @config.metadata,
638
+ retry_policy: @config.retry_policy
639
+
640
+ @data_object_service_stub.batch_update_data_objects request, options do |result, operation|
641
+ yield result, operation if block_given?
642
+ end
643
+ rescue ::Gapic::Rest::Error => e
644
+ raise ::Google::Cloud::Error.from_error(e)
645
+ end
646
+
647
+ ##
648
+ # Deletes a dataObject.
649
+ #
650
+ # @overload delete_data_object(request, options = nil)
651
+ # Pass arguments to `delete_data_object` via a request object, either of type
652
+ # {::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest} or an equivalent Hash.
653
+ #
654
+ # @param request [::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest, ::Hash]
655
+ # A request object representing the call parameters. Required. To specify no
656
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
657
+ # @param options [::Gapic::CallOptions, ::Hash]
658
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
659
+ #
660
+ # @overload delete_data_object(name: nil, etag: nil)
661
+ # Pass arguments to `delete_data_object` via keyword arguments. Note that at
662
+ # least one keyword argument is required. To specify no parameters, or to keep all
663
+ # the default parameter values, pass an empty Hash as a request object (see above).
664
+ #
665
+ # @param name [::String]
666
+ # Required. The name of the DataObject resource to be deleted.
667
+ # Format:
668
+ # `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
669
+ # @param etag [::String]
670
+ # Optional. The current etag of the DataObject.
671
+ # If an etag is provided and does not match the current etag of the
672
+ # DataObject, deletion will be blocked and an ABORTED error will be returned.
673
+ # @yield [result, operation] Access the result along with the TransportOperation object
674
+ # @yieldparam result [::Google::Protobuf::Empty]
675
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
676
+ #
677
+ # @return [::Google::Protobuf::Empty]
678
+ #
679
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
680
+ #
681
+ # @example Basic example
682
+ # require "google/cloud/vector_search/v1"
683
+ #
684
+ # # Create a client object. The client can be reused for multiple calls.
685
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
686
+ #
687
+ # # Create a request. To set request fields, pass in keyword arguments.
688
+ # request = Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest.new
689
+ #
690
+ # # Call the delete_data_object method.
691
+ # result = client.delete_data_object request
692
+ #
693
+ # # The returned object is of type Google::Protobuf::Empty.
694
+ # p result
695
+ #
696
+ def delete_data_object request, options = nil
697
+ raise ::ArgumentError, "request must be provided" if request.nil?
698
+
699
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest
700
+
701
+ # Converts hash and nil to an options object
702
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
703
+
704
+ # Customize the options with defaults
705
+ call_metadata = @config.rpcs.delete_data_object.metadata.to_h
706
+
707
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
708
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
709
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
710
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
711
+ transports_version_send: [:rest]
712
+
713
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
714
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
715
+
716
+ options.apply_defaults timeout: @config.rpcs.delete_data_object.timeout,
717
+ metadata: call_metadata,
718
+ retry_policy: @config.rpcs.delete_data_object.retry_policy
719
+
720
+ options.apply_defaults timeout: @config.timeout,
721
+ metadata: @config.metadata,
722
+ retry_policy: @config.retry_policy
723
+
724
+ @data_object_service_stub.delete_data_object request, options do |result, operation|
725
+ yield result, operation if block_given?
726
+ end
727
+ rescue ::Gapic::Rest::Error => e
728
+ raise ::Google::Cloud::Error.from_error(e)
729
+ end
730
+
731
+ ##
732
+ # Deletes dataObjects in a batch.
733
+ #
734
+ # @overload batch_delete_data_objects(request, options = nil)
735
+ # Pass arguments to `batch_delete_data_objects` via a request object, either of type
736
+ # {::Google::Cloud::VectorSearch::V1::BatchDeleteDataObjectsRequest} or an equivalent Hash.
737
+ #
738
+ # @param request [::Google::Cloud::VectorSearch::V1::BatchDeleteDataObjectsRequest, ::Hash]
739
+ # A request object representing the call parameters. Required. To specify no
740
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
741
+ # @param options [::Gapic::CallOptions, ::Hash]
742
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
743
+ #
744
+ # @overload batch_delete_data_objects(parent: nil, requests: nil)
745
+ # Pass arguments to `batch_delete_data_objects` via keyword arguments. Note that at
746
+ # least one keyword argument is required. To specify no parameters, or to keep all
747
+ # the default parameter values, pass an empty Hash as a request object (see above).
748
+ #
749
+ # @param parent [::String]
750
+ # Required. The resource name of the Collection to delete the DataObjects in.
751
+ # Format: `projects/{project}/locations/{location}/collections/{collection}`.
752
+ # @param requests [::Array<::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest, ::Hash>]
753
+ # Required. The request message specifying the resources to delete.
754
+ # A maximum of 1000 DataObjects can be deleted in a batch.
755
+ # @yield [result, operation] Access the result along with the TransportOperation object
756
+ # @yieldparam result [::Google::Protobuf::Empty]
757
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
758
+ #
759
+ # @return [::Google::Protobuf::Empty]
760
+ #
761
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
762
+ #
763
+ # @example Basic example
764
+ # require "google/cloud/vector_search/v1"
765
+ #
766
+ # # Create a client object. The client can be reused for multiple calls.
767
+ # client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new
768
+ #
769
+ # # Create a request. To set request fields, pass in keyword arguments.
770
+ # request = Google::Cloud::VectorSearch::V1::BatchDeleteDataObjectsRequest.new
771
+ #
772
+ # # Call the batch_delete_data_objects method.
773
+ # result = client.batch_delete_data_objects request
774
+ #
775
+ # # The returned object is of type Google::Protobuf::Empty.
776
+ # p result
777
+ #
778
+ def batch_delete_data_objects request, options = nil
779
+ raise ::ArgumentError, "request must be provided" if request.nil?
780
+
781
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VectorSearch::V1::BatchDeleteDataObjectsRequest
782
+
783
+ # Converts hash and nil to an options object
784
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
785
+
786
+ # Customize the options with defaults
787
+ call_metadata = @config.rpcs.batch_delete_data_objects.metadata.to_h
788
+
789
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
790
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
791
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
792
+ gapic_version: ::Google::Cloud::VectorSearch::V1::VERSION,
793
+ transports_version_send: [:rest]
794
+
795
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
796
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
797
+
798
+ options.apply_defaults timeout: @config.rpcs.batch_delete_data_objects.timeout,
799
+ metadata: call_metadata,
800
+ retry_policy: @config.rpcs.batch_delete_data_objects.retry_policy
801
+
802
+ options.apply_defaults timeout: @config.timeout,
803
+ metadata: @config.metadata,
804
+ retry_policy: @config.retry_policy
805
+
806
+ @data_object_service_stub.batch_delete_data_objects request, options do |result, operation|
807
+ yield result, operation if block_given?
808
+ end
809
+ rescue ::Gapic::Rest::Error => e
810
+ raise ::Google::Cloud::Error.from_error(e)
811
+ end
812
+
813
+ ##
814
+ # Configuration class for the DataObjectService REST API.
815
+ #
816
+ # This class represents the configuration for DataObjectService REST,
817
+ # providing control over timeouts, retry behavior, logging, transport
818
+ # parameters, and other low-level controls. Certain parameters can also be
819
+ # applied individually to specific RPCs. See
820
+ # {::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client::Configuration::Rpcs}
821
+ # for a list of RPCs that can be configured independently.
822
+ #
823
+ # Configuration can be applied globally to all clients, or to a single client
824
+ # on construction.
825
+ #
826
+ # @example
827
+ #
828
+ # # Modify the global config, setting the timeout for
829
+ # # create_data_object to 20 seconds,
830
+ # # and all remaining timeouts to 10 seconds.
831
+ # ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.configure do |config|
832
+ # config.timeout = 10.0
833
+ # config.rpcs.create_data_object.timeout = 20.0
834
+ # end
835
+ #
836
+ # # Apply the above configuration only to a new client.
837
+ # client = ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new do |config|
838
+ # config.timeout = 10.0
839
+ # config.rpcs.create_data_object.timeout = 20.0
840
+ # end
841
+ #
842
+ # @!attribute [rw] endpoint
843
+ # A custom service endpoint, as a hostname or hostname:port. The default is
844
+ # nil, indicating to use the default endpoint in the current universe domain.
845
+ # @return [::String,nil]
846
+ # @!attribute [rw] credentials
847
+ # Credentials to send with calls. You may provide any of the following types:
848
+ # * (`String`) The path to a service account key file in JSON format
849
+ # * (`Hash`) A service account key as a Hash
850
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
851
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
852
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
853
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
854
+ # * (`nil`) indicating no credentials
855
+ #
856
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
857
+ # external source for authentication to Google Cloud, you must validate it before
858
+ # providing it to a Google API client library. Providing an unvalidated credential
859
+ # configuration to Google APIs can compromise the security of your systems and data.
860
+ # For more information, refer to [Validate credential configurations from external
861
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
862
+ # @return [::Object]
863
+ # @!attribute [rw] scope
864
+ # The OAuth scopes
865
+ # @return [::Array<::String>]
866
+ # @!attribute [rw] lib_name
867
+ # The library name as recorded in instrumentation and logging
868
+ # @return [::String]
869
+ # @!attribute [rw] lib_version
870
+ # The library version as recorded in instrumentation and logging
871
+ # @return [::String]
872
+ # @!attribute [rw] timeout
873
+ # The call timeout in seconds.
874
+ # @return [::Numeric]
875
+ # @!attribute [rw] metadata
876
+ # Additional headers to be sent with the call.
877
+ # @return [::Hash{::Symbol=>::String}]
878
+ # @!attribute [rw] retry_policy
879
+ # The retry policy. The value is a hash with the following keys:
880
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
881
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
882
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
883
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
884
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
885
+ # trigger a retry.
886
+ # @return [::Hash]
887
+ # @!attribute [rw] quota_project
888
+ # A separate project against which to charge quota.
889
+ # @return [::String]
890
+ # @!attribute [rw] universe_domain
891
+ # The universe domain within which to make requests. This determines the
892
+ # default endpoint URL. The default value of nil uses the environment
893
+ # universe (usually the default "googleapis.com" universe).
894
+ # @return [::String,nil]
895
+ # @!attribute [rw] logger
896
+ # A custom logger to use for request/response debug logging, or the value
897
+ # `:default` (the default) to construct a default logger, or `nil` to
898
+ # explicitly disable logging.
899
+ # @return [::Logger,:default,nil]
900
+ #
901
+ class Configuration
902
+ extend ::Gapic::Config
903
+
904
+ # @private
905
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
906
+ DEFAULT_ENDPOINT = "vectorsearch.googleapis.com"
907
+
908
+ config_attr :endpoint, nil, ::String, nil
909
+ config_attr :credentials, nil do |value|
910
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
911
+ allowed.any? { |klass| klass === value }
912
+ end
913
+ config_attr :scope, nil, ::String, ::Array, nil
914
+ config_attr :lib_name, nil, ::String, nil
915
+ config_attr :lib_version, nil, ::String, nil
916
+ config_attr :timeout, nil, ::Numeric, nil
917
+ config_attr :metadata, nil, ::Hash, nil
918
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
919
+ config_attr :quota_project, nil, ::String, nil
920
+ config_attr :universe_domain, nil, ::String, nil
921
+
922
+ # @private
923
+ # Overrides for http bindings for the RPCs of this service
924
+ # are only used when this service is used as mixin, and only
925
+ # by the host service.
926
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
927
+ config_attr :bindings_override, {}, ::Hash, nil
928
+ config_attr :logger, :default, ::Logger, nil, :default
929
+
930
+ # @private
931
+ def initialize parent_config = nil
932
+ @parent_config = parent_config unless parent_config.nil?
933
+
934
+ yield self if block_given?
935
+ end
936
+
937
+ ##
938
+ # Configurations for individual RPCs
939
+ # @return [Rpcs]
940
+ #
941
+ def rpcs
942
+ @rpcs ||= begin
943
+ parent_rpcs = nil
944
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
945
+ Rpcs.new parent_rpcs
946
+ end
947
+ end
948
+
949
+ ##
950
+ # Configuration RPC class for the DataObjectService API.
951
+ #
952
+ # Includes fields providing the configuration for each RPC in this service.
953
+ # Each configuration object is of type `Gapic::Config::Method` and includes
954
+ # the following configuration fields:
955
+ #
956
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
957
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
958
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
959
+ # include the following keys:
960
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
961
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
962
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
963
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
964
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
965
+ # trigger a retry.
966
+ #
967
+ class Rpcs
968
+ ##
969
+ # RPC-specific configuration for `create_data_object`
970
+ # @return [::Gapic::Config::Method]
971
+ #
972
+ attr_reader :create_data_object
973
+ ##
974
+ # RPC-specific configuration for `batch_create_data_objects`
975
+ # @return [::Gapic::Config::Method]
976
+ #
977
+ attr_reader :batch_create_data_objects
978
+ ##
979
+ # RPC-specific configuration for `get_data_object`
980
+ # @return [::Gapic::Config::Method]
981
+ #
982
+ attr_reader :get_data_object
983
+ ##
984
+ # RPC-specific configuration for `update_data_object`
985
+ # @return [::Gapic::Config::Method]
986
+ #
987
+ attr_reader :update_data_object
988
+ ##
989
+ # RPC-specific configuration for `batch_update_data_objects`
990
+ # @return [::Gapic::Config::Method]
991
+ #
992
+ attr_reader :batch_update_data_objects
993
+ ##
994
+ # RPC-specific configuration for `delete_data_object`
995
+ # @return [::Gapic::Config::Method]
996
+ #
997
+ attr_reader :delete_data_object
998
+ ##
999
+ # RPC-specific configuration for `batch_delete_data_objects`
1000
+ # @return [::Gapic::Config::Method]
1001
+ #
1002
+ attr_reader :batch_delete_data_objects
1003
+
1004
+ # @private
1005
+ def initialize parent_rpcs = nil
1006
+ create_data_object_config = parent_rpcs.create_data_object if parent_rpcs.respond_to? :create_data_object
1007
+ @create_data_object = ::Gapic::Config::Method.new create_data_object_config
1008
+ batch_create_data_objects_config = parent_rpcs.batch_create_data_objects if parent_rpcs.respond_to? :batch_create_data_objects
1009
+ @batch_create_data_objects = ::Gapic::Config::Method.new batch_create_data_objects_config
1010
+ get_data_object_config = parent_rpcs.get_data_object if parent_rpcs.respond_to? :get_data_object
1011
+ @get_data_object = ::Gapic::Config::Method.new get_data_object_config
1012
+ update_data_object_config = parent_rpcs.update_data_object if parent_rpcs.respond_to? :update_data_object
1013
+ @update_data_object = ::Gapic::Config::Method.new update_data_object_config
1014
+ batch_update_data_objects_config = parent_rpcs.batch_update_data_objects if parent_rpcs.respond_to? :batch_update_data_objects
1015
+ @batch_update_data_objects = ::Gapic::Config::Method.new batch_update_data_objects_config
1016
+ delete_data_object_config = parent_rpcs.delete_data_object if parent_rpcs.respond_to? :delete_data_object
1017
+ @delete_data_object = ::Gapic::Config::Method.new delete_data_object_config
1018
+ batch_delete_data_objects_config = parent_rpcs.batch_delete_data_objects if parent_rpcs.respond_to? :batch_delete_data_objects
1019
+ @batch_delete_data_objects = ::Gapic::Config::Method.new batch_delete_data_objects_config
1020
+
1021
+ yield self if block_given?
1022
+ end
1023
+ end
1024
+ end
1025
+ end
1026
+ end
1027
+ end
1028
+ end
1029
+ end
1030
+ end
1031
+ end