google-cloud-discovery_engine-v1beta 0.8.0 → 0.10.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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +5 -1
  4. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +5 -1
  5. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +94 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +1 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +3 -1
  8. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +45 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +3 -1
  10. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +469 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/credentials.rb +47 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +801 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/paths.rb +78 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +436 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +1077 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +129 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest.rb +53 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service.rb +56 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +5 -4
  20. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/paths.rb +21 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +5 -4
  22. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb +2 -1
  23. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service.rb +2 -1
  24. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  25. data/lib/google/cloud/discovery_engine/v1beta.rb +1 -0
  26. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +1 -1
  27. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +5 -1
  28. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +3 -1
  29. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +48 -0
  30. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +1 -1
  31. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +2 -1
  32. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +57 -0
  33. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +45 -0
  34. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +1 -1
  35. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +2 -1
  36. data/proto_docs/google/api/client.rb +4 -0
  37. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +5 -0
  38. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +20 -0
  39. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +7 -0
  40. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +103 -0
  41. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +3 -0
  42. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +17 -4
  43. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +126 -0
  44. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +4 -3
  45. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +3 -3
  46. metadata +18 -116
@@ -0,0 +1,469 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/discoveryengine/v1beta/search_tuning_service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module DiscoveryEngine
26
+ module V1beta
27
+ module SearchTuningService
28
+ ##
29
+ # Client for the SearchTuningService service.
30
+ #
31
+ # Service for search tuning.
32
+ #
33
+ class Client
34
+ # @private
35
+ DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
36
+
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :search_tuning_service_stub
41
+
42
+ ##
43
+ # Configure the SearchTuningService Client class.
44
+ #
45
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all SearchTuningService clients
51
+ # ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "DiscoveryEngine", "V1beta"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config
72
+ end
73
+ yield @configure if block_given?
74
+ @configure
75
+ end
76
+
77
+ ##
78
+ # Configure the SearchTuningService Client instance.
79
+ #
80
+ # The configuration is set to the derived mode, meaning that values can be changed,
81
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
82
+ # should be made on {Client.configure}.
83
+ #
84
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client::Configuration}
85
+ # for a description of the configuration fields.
86
+ #
87
+ # @yield [config] Configure the Client client.
88
+ # @yieldparam config [Client::Configuration]
89
+ #
90
+ # @return [Client::Configuration]
91
+ #
92
+ def configure
93
+ yield @config if block_given?
94
+ @config
95
+ end
96
+
97
+ ##
98
+ # The effective universe domain
99
+ #
100
+ # @return [String]
101
+ #
102
+ def universe_domain
103
+ @search_tuning_service_stub.universe_domain
104
+ end
105
+
106
+ ##
107
+ # Create a new SearchTuningService client object.
108
+ #
109
+ # @example
110
+ #
111
+ # # Create a client using the default configuration
112
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.new
113
+ #
114
+ # # Create a client using a custom configuration
115
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.new do |config|
116
+ # config.timeout = 10.0
117
+ # end
118
+ #
119
+ # @yield [config] Configure the SearchTuningService client.
120
+ # @yieldparam config [Client::Configuration]
121
+ #
122
+ def initialize
123
+ # These require statements are intentionally placed here to initialize
124
+ # the gRPC module only when it's required.
125
+ # See https://github.com/googleapis/toolkit/issues/446
126
+ require "gapic/grpc"
127
+ require "google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb"
128
+
129
+ # Create the configuration object
130
+ @config = Configuration.new Client.configure
131
+
132
+ # Yield the configuration if needed
133
+ yield @config if block_given?
134
+
135
+ # Create credentials
136
+ credentials = @config.credentials
137
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
+ # but only if the default endpoint does not have a region prefix.
139
+ enable_self_signed_jwt = @config.endpoint.nil? ||
140
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
+ !@config.endpoint.split(".").first.include?("-"))
142
+ credentials ||= Credentials.default scope: @config.scope,
143
+ enable_self_signed_jwt: enable_self_signed_jwt
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
+ credentials = Credentials.new credentials, scope: @config.scope
146
+ end
147
+ @quota_project_id = @config.quota_project
148
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
149
+
150
+ @operations_client = Operations.new do |config|
151
+ config.credentials = credentials
152
+ config.quota_project = @quota_project_id
153
+ config.endpoint = @config.endpoint
154
+ config.universe_domain = @config.universe_domain
155
+ end
156
+
157
+ @search_tuning_service_stub = ::Gapic::ServiceStub.new(
158
+ ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Stub,
159
+ credentials: credentials,
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ channel_args: @config.channel_args,
164
+ interceptors: @config.interceptors,
165
+ channel_pool_config: @config.channel_pool
166
+ )
167
+
168
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
169
+ config.credentials = credentials
170
+ config.quota_project = @quota_project_id
171
+ config.endpoint = @search_tuning_service_stub.endpoint
172
+ config.universe_domain = @search_tuning_service_stub.universe_domain
173
+ end
174
+ end
175
+
176
+ ##
177
+ # Get the associated client for long-running operations.
178
+ #
179
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Operations]
180
+ #
181
+ attr_reader :operations_client
182
+
183
+ ##
184
+ # Get the associated client for mix-in of the Locations.
185
+ #
186
+ # @return [Google::Cloud::Location::Locations::Client]
187
+ #
188
+ attr_reader :location_client
189
+
190
+ # Service calls
191
+
192
+ ##
193
+ # Trains a custom model.
194
+ #
195
+ # @overload train_custom_model(request, options = nil)
196
+ # Pass arguments to `train_custom_model` via a request object, either of type
197
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest} or an equivalent Hash.
198
+ #
199
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
204
+ #
205
+ # @overload train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil)
206
+ # Pass arguments to `train_custom_model` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param gcs_training_input [::Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest::GcsTrainingInput, ::Hash]
211
+ # Cloud Storage training input.
212
+ # @param data_store [::String]
213
+ # Required. The resource name of the Data Store, such as
214
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
215
+ # This field is used to identify the data store where to train the models.
216
+ # @param model_type [::String]
217
+ # Model to be trained. Supported values are:
218
+ #
219
+ # * **search-tuning**: Fine tuning the search system based on data provided.
220
+ # @param error_config [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig, ::Hash]
221
+ # The desired location of errors incurred during the data ingestion and
222
+ # training.
223
+ #
224
+ # @yield [response, operation] Access the result along with the RPC operation
225
+ # @yieldparam response [::Gapic::Operation]
226
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
227
+ #
228
+ # @return [::Gapic::Operation]
229
+ #
230
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
231
+ #
232
+ # @example Basic example
233
+ # require "google/cloud/discovery_engine/v1beta"
234
+ #
235
+ # # Create a client object. The client can be reused for multiple calls.
236
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.new
237
+ #
238
+ # # Create a request. To set request fields, pass in keyword arguments.
239
+ # request = Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest.new
240
+ #
241
+ # # Call the train_custom_model method.
242
+ # result = client.train_custom_model request
243
+ #
244
+ # # The returned object is of type Gapic::Operation. You can use it to
245
+ # # check the status of an operation, cancel it, or wait for results.
246
+ # # Here is how to wait for a response.
247
+ # result.wait_until_done! timeout: 60
248
+ # if result.response?
249
+ # p result.response
250
+ # else
251
+ # puts "No response received."
252
+ # end
253
+ #
254
+ def train_custom_model request, options = nil
255
+ raise ::ArgumentError, "request must be provided" if request.nil?
256
+
257
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest
258
+
259
+ # Converts hash and nil to an options object
260
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
261
+
262
+ # Customize the options with defaults
263
+ metadata = @config.rpcs.train_custom_model.metadata.to_h
264
+
265
+ # Set x-goog-api-client and x-goog-user-project headers
266
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
267
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
268
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
269
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
270
+
271
+ header_params = {}
272
+ if request.data_store
273
+ header_params["data_store"] = request.data_store
274
+ end
275
+
276
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
277
+ metadata[:"x-goog-request-params"] ||= request_params_header
278
+
279
+ options.apply_defaults timeout: @config.rpcs.train_custom_model.timeout,
280
+ metadata: metadata,
281
+ retry_policy: @config.rpcs.train_custom_model.retry_policy
282
+
283
+ options.apply_defaults timeout: @config.timeout,
284
+ metadata: @config.metadata,
285
+ retry_policy: @config.retry_policy
286
+
287
+ @search_tuning_service_stub.call_rpc :train_custom_model, request, options: options do |response, operation|
288
+ response = ::Gapic::Operation.new response, @operations_client, options: options
289
+ yield response, operation if block_given?
290
+ return response
291
+ end
292
+ rescue ::GRPC::BadStatus => e
293
+ raise ::Google::Cloud::Error.from_error(e)
294
+ end
295
+
296
+ ##
297
+ # Configuration class for the SearchTuningService API.
298
+ #
299
+ # This class represents the configuration for SearchTuningService,
300
+ # providing control over timeouts, retry behavior, logging, transport
301
+ # parameters, and other low-level controls. Certain parameters can also be
302
+ # applied individually to specific RPCs. See
303
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client::Configuration::Rpcs}
304
+ # for a list of RPCs that can be configured independently.
305
+ #
306
+ # Configuration can be applied globally to all clients, or to a single client
307
+ # on construction.
308
+ #
309
+ # @example
310
+ #
311
+ # # Modify the global config, setting the timeout for
312
+ # # train_custom_model to 20 seconds,
313
+ # # and all remaining timeouts to 10 seconds.
314
+ # ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.configure do |config|
315
+ # config.timeout = 10.0
316
+ # config.rpcs.train_custom_model.timeout = 20.0
317
+ # end
318
+ #
319
+ # # Apply the above configuration only to a new client.
320
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.new do |config|
321
+ # config.timeout = 10.0
322
+ # config.rpcs.train_custom_model.timeout = 20.0
323
+ # end
324
+ #
325
+ # @!attribute [rw] endpoint
326
+ # A custom service endpoint, as a hostname or hostname:port. The default is
327
+ # nil, indicating to use the default endpoint in the current universe domain.
328
+ # @return [::String,nil]
329
+ # @!attribute [rw] credentials
330
+ # Credentials to send with calls. You may provide any of the following types:
331
+ # * (`String`) The path to a service account key file in JSON format
332
+ # * (`Hash`) A service account key as a Hash
333
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
334
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
335
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
336
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
337
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
338
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
339
+ # * (`nil`) indicating no credentials
340
+ # @return [::Object]
341
+ # @!attribute [rw] scope
342
+ # The OAuth scopes
343
+ # @return [::Array<::String>]
344
+ # @!attribute [rw] lib_name
345
+ # The library name as recorded in instrumentation and logging
346
+ # @return [::String]
347
+ # @!attribute [rw] lib_version
348
+ # The library version as recorded in instrumentation and logging
349
+ # @return [::String]
350
+ # @!attribute [rw] channel_args
351
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
352
+ # `GRPC::Core::Channel` object is provided as the credential.
353
+ # @return [::Hash]
354
+ # @!attribute [rw] interceptors
355
+ # An array of interceptors that are run before calls are executed.
356
+ # @return [::Array<::GRPC::ClientInterceptor>]
357
+ # @!attribute [rw] timeout
358
+ # The call timeout in seconds.
359
+ # @return [::Numeric]
360
+ # @!attribute [rw] metadata
361
+ # Additional gRPC headers to be sent with the call.
362
+ # @return [::Hash{::Symbol=>::String}]
363
+ # @!attribute [rw] retry_policy
364
+ # The retry policy. The value is a hash with the following keys:
365
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
366
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
367
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
368
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
369
+ # trigger a retry.
370
+ # @return [::Hash]
371
+ # @!attribute [rw] quota_project
372
+ # A separate project against which to charge quota.
373
+ # @return [::String]
374
+ # @!attribute [rw] universe_domain
375
+ # The universe domain within which to make requests. This determines the
376
+ # default endpoint URL. The default value of nil uses the environment
377
+ # universe (usually the default "googleapis.com" universe).
378
+ # @return [::String,nil]
379
+ #
380
+ class Configuration
381
+ extend ::Gapic::Config
382
+
383
+ # @private
384
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
385
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
386
+
387
+ config_attr :endpoint, nil, ::String, nil
388
+ config_attr :credentials, nil do |value|
389
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
390
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
391
+ allowed.any? { |klass| klass === value }
392
+ end
393
+ config_attr :scope, nil, ::String, ::Array, nil
394
+ config_attr :lib_name, nil, ::String, nil
395
+ config_attr :lib_version, nil, ::String, nil
396
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
397
+ config_attr :interceptors, nil, ::Array, nil
398
+ config_attr :timeout, nil, ::Numeric, nil
399
+ config_attr :metadata, nil, ::Hash, nil
400
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
401
+ config_attr :quota_project, nil, ::String, nil
402
+ config_attr :universe_domain, nil, ::String, nil
403
+
404
+ # @private
405
+ def initialize parent_config = nil
406
+ @parent_config = parent_config unless parent_config.nil?
407
+
408
+ yield self if block_given?
409
+ end
410
+
411
+ ##
412
+ # Configurations for individual RPCs
413
+ # @return [Rpcs]
414
+ #
415
+ def rpcs
416
+ @rpcs ||= begin
417
+ parent_rpcs = nil
418
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
419
+ Rpcs.new parent_rpcs
420
+ end
421
+ end
422
+
423
+ ##
424
+ # Configuration for the channel pool
425
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
426
+ #
427
+ def channel_pool
428
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
429
+ end
430
+
431
+ ##
432
+ # Configuration RPC class for the SearchTuningService API.
433
+ #
434
+ # Includes fields providing the configuration for each RPC in this service.
435
+ # Each configuration object is of type `Gapic::Config::Method` and includes
436
+ # the following configuration fields:
437
+ #
438
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
439
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
440
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
441
+ # include the following keys:
442
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
443
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
444
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
445
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
446
+ # trigger a retry.
447
+ #
448
+ class Rpcs
449
+ ##
450
+ # RPC-specific configuration for `train_custom_model`
451
+ # @return [::Gapic::Config::Method]
452
+ #
453
+ attr_reader :train_custom_model
454
+
455
+ # @private
456
+ def initialize parent_rpcs = nil
457
+ train_custom_model_config = parent_rpcs.train_custom_model if parent_rpcs.respond_to? :train_custom_model
458
+ @train_custom_model = ::Gapic::Config::Method.new train_custom_model_config
459
+
460
+ yield self if block_given?
461
+ end
462
+ end
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end
468
+ end
469
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module DiscoveryEngine
24
+ module V1beta
25
+ module SearchTuningService
26
+ # Credentials for the SearchTuningService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end