google-cloud-ai_platform-v1 1.20.0 → 1.21.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f160dfb751785100f39c1eadc987168d1b70f2027e6ac152d84310bf2e2310fd
4
- data.tar.gz: 201173b1f49652e454f6f02608b069b7656838e49144cec7ac231bb3d1c59c4a
3
+ metadata.gz: 3912ca85dc0060f14660ba7be39ec3ae0d38cf6535677848844129e578a35f2d
4
+ data.tar.gz: a62fc1c739cba5e9ebe6686a3692526e56107cd1842436fe6418e589f1cfa8eb
5
5
  SHA512:
6
- metadata.gz: da6fc27ac30ce5cb4552c3c54b5e5fe6ed50ba4b7a1f581b4b022934603f548b5bdd7e30222adfe43434dfb865232fd583ce99d40e6b8662552c8ed3eca55015
7
- data.tar.gz: ab69f022166cdfd4242708b18d3c9b034ff6aa1db8e87c334b468a0a10389bcbb9109949c1e8f92812e3a76b6f68f0a8b57f99ec0d9005d990beadc81a8bd86a
6
+ metadata.gz: 8994323e26f7a5af766c9f86a015a1b858c692ca2cfdabe40091740d60451b836dcf73541c8285089e5eb2f86cd6686c87094bfccfc5c36ad37cbe557e7929a9
7
+ data.tar.gz: 054216cb3a951b8a6d907f493ad541592167918e03c8a19d6da12c66fe1c807dcba50278ead30fb656f97a156c07634772b01ef75f451cc19e2df6930f2a2f61
data/AUTHENTICATION.md CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
56
56
  ```ruby
57
57
  require "google/cloud/ai_platform/v1"
58
58
 
59
- client = ::Google::Cloud::AIPlatform::V1::DatasetService::Client.new do |config|
59
+ client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new do |config|
60
60
  config.credentials = "path/to/credentialfile.json"
61
61
  end
62
62
  ```
@@ -66,11 +66,11 @@ To configure a credentials file globally for all clients:
66
66
  ```ruby
67
67
  require "google/cloud/ai_platform/v1"
68
68
 
69
- ::Google::Cloud::AIPlatform::V1::DatasetService::Client.configure do |config|
69
+ ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.configure do |config|
70
70
  config.credentials = "path/to/credentialfile.json"
71
71
  end
72
72
 
73
- client = ::Google::Cloud::AIPlatform::V1::DatasetService::Client.new
73
+ client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new
74
74
  ```
75
75
 
76
76
  ### Environment Variables
@@ -100,7 +100,7 @@ require "google/cloud/ai_platform/v1"
100
100
 
101
101
  ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102
102
 
103
- client = ::Google::Cloud::AIPlatform::V1::DatasetService::Client.new
103
+ client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new
104
104
  ```
105
105
 
106
106
  ### Local ADC file
data/README.md CHANGED
@@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps:
32
32
  ```ruby
33
33
  require "google/cloud/ai_platform/v1"
34
34
 
35
- client = ::Google::Cloud::AIPlatform::V1::DatasetService::Client.new
36
- request = ::Google::Cloud::AIPlatform::V1::CreateDatasetRequest.new # (request fields as keyword arguments...)
37
- response = client.create_dataset request
35
+ client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new
36
+ request = ::Google::Cloud::AIPlatform::V1::GenerateSyntheticDataRequest.new # (request fields as keyword arguments...)
37
+ response = client.generate_synthetic_data request
38
38
  ```
39
39
 
40
40
  View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest)
@@ -75,7 +75,7 @@ constructing a client object. For example:
75
75
  require "google/cloud/ai_platform/v1"
76
76
  require "logger"
77
77
 
78
- client = ::Google::Cloud::AIPlatform::V1::DatasetService::Client.new do |config|
78
+ client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new do |config|
79
79
  config.logger = Logger.new "my-app.log"
80
80
  end
81
81
  ```
@@ -16,7 +16,7 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/config"
19
+ require "gapic/rest"
20
20
 
21
21
  module Google
22
22
  module Cloud
@@ -25,7 +25,7 @@ module Google
25
25
  # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
26
  #
27
27
  # require "google/cloud/ai_platform/v1/rest"
28
- # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
28
+ # client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Rest::Client.new
29
29
  #
30
30
  module V1
31
31
  ##
@@ -42,7 +42,7 @@ module Google
42
42
  namespace.pop
43
43
  end
44
44
 
45
- default_config = Configuration.new parent_config
45
+ default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config
46
46
  default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
47
  Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
48
  uri_method: :get,
@@ -438,33 +438,6 @@ module Google
438
438
  yield @configure if block_given?
439
439
  @configure
440
440
  end
441
-
442
- ##
443
- # @private
444
- # Configuration class for the google.cloud.aiplatform.v1 package.
445
- #
446
- # This class contains common configuration for all services
447
- # of the google.cloud.aiplatform.v1 package.
448
- #
449
- # This configuration is for internal use of the client library classes,
450
- # and it is not intended that the end-users will read or change it.
451
- #
452
- class Configuration
453
- extend ::Gapic::Config
454
-
455
- # @private
456
- # Overrides for http bindings for the RPC of the mixins for this package.
457
- # Services in this package should use these when creating clients for the mixin services.
458
- # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
459
- config_attr :bindings_override, {}, ::Hash, nil
460
-
461
- # @private
462
- def initialize parent_config = nil
463
- @parent_config = parent_config unless parent_config.nil?
464
-
465
- yield self if block_given?
466
- end
467
- end
468
441
  end
469
442
  end
470
443
  end
@@ -0,0 +1,500 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/aiplatform/v1/data_foundry_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module AIPlatform
27
+ module V1
28
+ module DataFoundryService
29
+ ##
30
+ # Client for the DataFoundryService service.
31
+ #
32
+ # Service for generating and preparing datasets for Gen AI evaluation.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :data_foundry_service_stub
45
+
46
+ ##
47
+ # Configure the DataFoundryService Client class.
48
+ #
49
+ # See {::Google::Cloud::AIPlatform::V1::DataFoundryService::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all DataFoundryService clients
55
+ # ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the DataFoundryService Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::AIPlatform::V1::DataFoundryService::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # The effective universe domain
103
+ #
104
+ # @return [String]
105
+ #
106
+ def universe_domain
107
+ @data_foundry_service_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new DataFoundryService client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the DataFoundryService client.
124
+ # @yieldparam config [Client::Configuration]
125
+ #
126
+ def initialize
127
+ # These require statements are intentionally placed here to initialize
128
+ # the gRPC module only when it's required.
129
+ # See https://github.com/googleapis/toolkit/issues/446
130
+ require "gapic/grpc"
131
+ require "google/cloud/aiplatform/v1/data_foundry_service_services_pb"
132
+
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @data_foundry_service_stub = ::Gapic::ServiceStub.new(
155
+ ::Google::Cloud::AIPlatform::V1::DataFoundryService::Stub,
156
+ credentials: credentials,
157
+ endpoint: @config.endpoint,
158
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
159
+ universe_domain: @config.universe_domain,
160
+ channel_args: @config.channel_args,
161
+ interceptors: @config.interceptors,
162
+ channel_pool_config: @config.channel_pool,
163
+ logger: @config.logger
164
+ )
165
+
166
+ @data_foundry_service_stub.stub_logger&.info do |entry|
167
+ entry.set_system_name
168
+ entry.set_service
169
+ entry.message = "Created client for #{entry.service}"
170
+ entry.set_credentials_fields credentials
171
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
172
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
173
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
174
+ end
175
+
176
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
177
+ config.credentials = credentials
178
+ config.quota_project = @quota_project_id
179
+ config.endpoint = @data_foundry_service_stub.endpoint
180
+ config.universe_domain = @data_foundry_service_stub.universe_domain
181
+ config.logger = @data_foundry_service_stub.logger if config.respond_to? :logger=
182
+ end
183
+
184
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
185
+ config.credentials = credentials
186
+ config.quota_project = @quota_project_id
187
+ config.endpoint = @data_foundry_service_stub.endpoint
188
+ config.universe_domain = @data_foundry_service_stub.universe_domain
189
+ config.logger = @data_foundry_service_stub.logger if config.respond_to? :logger=
190
+ end
191
+ end
192
+
193
+ ##
194
+ # Get the associated client for mix-in of the Locations.
195
+ #
196
+ # @return [Google::Cloud::Location::Locations::Client]
197
+ #
198
+ attr_reader :location_client
199
+
200
+ ##
201
+ # Get the associated client for mix-in of the IAMPolicy.
202
+ #
203
+ # @return [Google::Iam::V1::IAMPolicy::Client]
204
+ #
205
+ attr_reader :iam_policy_client
206
+
207
+ ##
208
+ # The logger used for request/response debug logging.
209
+ #
210
+ # @return [Logger]
211
+ #
212
+ def logger
213
+ @data_foundry_service_stub.logger
214
+ end
215
+
216
+ # Service calls
217
+
218
+ ##
219
+ # Generates synthetic data based on the provided configuration.
220
+ #
221
+ # @overload generate_synthetic_data(request, options = nil)
222
+ # Pass arguments to `generate_synthetic_data` via a request object, either of type
223
+ # {::Google::Cloud::AIPlatform::V1::GenerateSyntheticDataRequest} or an equivalent Hash.
224
+ #
225
+ # @param request [::Google::Cloud::AIPlatform::V1::GenerateSyntheticDataRequest, ::Hash]
226
+ # A request object representing the call parameters. Required. To specify no
227
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
228
+ # @param options [::Gapic::CallOptions, ::Hash]
229
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
230
+ #
231
+ # @overload generate_synthetic_data(task_description: nil, location: nil, count: nil, output_field_specs: nil, examples: nil)
232
+ # Pass arguments to `generate_synthetic_data` via keyword arguments. Note that at
233
+ # least one keyword argument is required. To specify no parameters, or to keep all
234
+ # the default parameter values, pass an empty Hash as a request object (see above).
235
+ #
236
+ # @param task_description [::Google::Cloud::AIPlatform::V1::TaskDescriptionStrategy, ::Hash]
237
+ # Generate data from a high-level task description.
238
+ # @param location [::String]
239
+ # Required. The resource name of the Location to run the job.
240
+ # Format: `projects/{project}/locations/{location}`
241
+ # @param count [::Integer]
242
+ # Required. The number of synthetic examples to generate.
243
+ # For this stateless API, the count is limited to a small number.
244
+ # @param output_field_specs [::Array<::Google::Cloud::AIPlatform::V1::OutputFieldSpec, ::Hash>]
245
+ # Required. The schema of the desired output, defined by a list of fields.
246
+ # @param examples [::Array<::Google::Cloud::AIPlatform::V1::SyntheticExample, ::Hash>]
247
+ # Optional. A list of few-shot examples to guide the model's output style
248
+ # and format.
249
+ #
250
+ # @yield [response, operation] Access the result along with the RPC operation
251
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::GenerateSyntheticDataResponse]
252
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
253
+ #
254
+ # @return [::Google::Cloud::AIPlatform::V1::GenerateSyntheticDataResponse]
255
+ #
256
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
257
+ #
258
+ # @example Basic example
259
+ # require "google/cloud/ai_platform/v1"
260
+ #
261
+ # # Create a client object. The client can be reused for multiple calls.
262
+ # client = Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new
263
+ #
264
+ # # Create a request. To set request fields, pass in keyword arguments.
265
+ # request = Google::Cloud::AIPlatform::V1::GenerateSyntheticDataRequest.new
266
+ #
267
+ # # Call the generate_synthetic_data method.
268
+ # result = client.generate_synthetic_data request
269
+ #
270
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::GenerateSyntheticDataResponse.
271
+ # p result
272
+ #
273
+ def generate_synthetic_data request, options = nil
274
+ raise ::ArgumentError, "request must be provided" if request.nil?
275
+
276
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GenerateSyntheticDataRequest
277
+
278
+ # Converts hash and nil to an options object
279
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
280
+
281
+ # Customize the options with defaults
282
+ metadata = @config.rpcs.generate_synthetic_data.metadata.to_h
283
+
284
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
285
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
286
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
287
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
288
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
289
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
290
+
291
+ header_params = {}
292
+ if request.location
293
+ header_params["location"] = request.location
294
+ end
295
+
296
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
297
+ metadata[:"x-goog-request-params"] ||= request_params_header
298
+
299
+ options.apply_defaults timeout: @config.rpcs.generate_synthetic_data.timeout,
300
+ metadata: metadata,
301
+ retry_policy: @config.rpcs.generate_synthetic_data.retry_policy
302
+
303
+ options.apply_defaults timeout: @config.timeout,
304
+ metadata: @config.metadata,
305
+ retry_policy: @config.retry_policy
306
+
307
+ @data_foundry_service_stub.call_rpc :generate_synthetic_data, request, options: options do |response, operation|
308
+ yield response, operation if block_given?
309
+ end
310
+ rescue ::GRPC::BadStatus => e
311
+ raise ::Google::Cloud::Error.from_error(e)
312
+ end
313
+
314
+ ##
315
+ # Configuration class for the DataFoundryService API.
316
+ #
317
+ # This class represents the configuration for DataFoundryService,
318
+ # providing control over timeouts, retry behavior, logging, transport
319
+ # parameters, and other low-level controls. Certain parameters can also be
320
+ # applied individually to specific RPCs. See
321
+ # {::Google::Cloud::AIPlatform::V1::DataFoundryService::Client::Configuration::Rpcs}
322
+ # for a list of RPCs that can be configured independently.
323
+ #
324
+ # Configuration can be applied globally to all clients, or to a single client
325
+ # on construction.
326
+ #
327
+ # @example
328
+ #
329
+ # # Modify the global config, setting the timeout for
330
+ # # generate_synthetic_data to 20 seconds,
331
+ # # and all remaining timeouts to 10 seconds.
332
+ # ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.configure do |config|
333
+ # config.timeout = 10.0
334
+ # config.rpcs.generate_synthetic_data.timeout = 20.0
335
+ # end
336
+ #
337
+ # # Apply the above configuration only to a new client.
338
+ # client = ::Google::Cloud::AIPlatform::V1::DataFoundryService::Client.new do |config|
339
+ # config.timeout = 10.0
340
+ # config.rpcs.generate_synthetic_data.timeout = 20.0
341
+ # end
342
+ #
343
+ # @!attribute [rw] endpoint
344
+ # A custom service endpoint, as a hostname or hostname:port. The default is
345
+ # nil, indicating to use the default endpoint in the current universe domain.
346
+ # @return [::String,nil]
347
+ # @!attribute [rw] credentials
348
+ # Credentials to send with calls. You may provide any of the following types:
349
+ # * (`String`) The path to a service account key file in JSON format
350
+ # * (`Hash`) A service account key as a Hash
351
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
352
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
353
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
354
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
355
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
356
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
357
+ # * (`nil`) indicating no credentials
358
+ #
359
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
360
+ # external source for authentication to Google Cloud, you must validate it before
361
+ # providing it to a Google API client library. Providing an unvalidated credential
362
+ # configuration to Google APIs can compromise the security of your systems and data.
363
+ # For more information, refer to [Validate credential configurations from external
364
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
365
+ # @return [::Object]
366
+ # @!attribute [rw] scope
367
+ # The OAuth scopes
368
+ # @return [::Array<::String>]
369
+ # @!attribute [rw] lib_name
370
+ # The library name as recorded in instrumentation and logging
371
+ # @return [::String]
372
+ # @!attribute [rw] lib_version
373
+ # The library version as recorded in instrumentation and logging
374
+ # @return [::String]
375
+ # @!attribute [rw] channel_args
376
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
377
+ # `GRPC::Core::Channel` object is provided as the credential.
378
+ # @return [::Hash]
379
+ # @!attribute [rw] interceptors
380
+ # An array of interceptors that are run before calls are executed.
381
+ # @return [::Array<::GRPC::ClientInterceptor>]
382
+ # @!attribute [rw] timeout
383
+ # The call timeout in seconds.
384
+ # @return [::Numeric]
385
+ # @!attribute [rw] metadata
386
+ # Additional gRPC headers to be sent with the call.
387
+ # @return [::Hash{::Symbol=>::String}]
388
+ # @!attribute [rw] retry_policy
389
+ # The retry policy. The value is a hash with the following keys:
390
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
391
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
392
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
393
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
394
+ # trigger a retry.
395
+ # @return [::Hash]
396
+ # @!attribute [rw] quota_project
397
+ # A separate project against which to charge quota.
398
+ # @return [::String]
399
+ # @!attribute [rw] universe_domain
400
+ # The universe domain within which to make requests. This determines the
401
+ # default endpoint URL. The default value of nil uses the environment
402
+ # universe (usually the default "googleapis.com" universe).
403
+ # @return [::String,nil]
404
+ # @!attribute [rw] logger
405
+ # A custom logger to use for request/response debug logging, or the value
406
+ # `:default` (the default) to construct a default logger, or `nil` to
407
+ # explicitly disable logging.
408
+ # @return [::Logger,:default,nil]
409
+ #
410
+ class Configuration
411
+ extend ::Gapic::Config
412
+
413
+ # @private
414
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
415
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
416
+
417
+ config_attr :endpoint, nil, ::String, nil
418
+ config_attr :credentials, nil do |value|
419
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
420
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
421
+ allowed.any? { |klass| klass === value }
422
+ end
423
+ config_attr :scope, nil, ::String, ::Array, nil
424
+ config_attr :lib_name, nil, ::String, nil
425
+ config_attr :lib_version, nil, ::String, nil
426
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
427
+ config_attr :interceptors, nil, ::Array, nil
428
+ config_attr :timeout, nil, ::Numeric, nil
429
+ config_attr :metadata, nil, ::Hash, nil
430
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
431
+ config_attr :quota_project, nil, ::String, nil
432
+ config_attr :universe_domain, nil, ::String, nil
433
+ config_attr :logger, :default, ::Logger, nil, :default
434
+
435
+ # @private
436
+ def initialize parent_config = nil
437
+ @parent_config = parent_config unless parent_config.nil?
438
+
439
+ yield self if block_given?
440
+ end
441
+
442
+ ##
443
+ # Configurations for individual RPCs
444
+ # @return [Rpcs]
445
+ #
446
+ def rpcs
447
+ @rpcs ||= begin
448
+ parent_rpcs = nil
449
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
450
+ Rpcs.new parent_rpcs
451
+ end
452
+ end
453
+
454
+ ##
455
+ # Configuration for the channel pool
456
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
457
+ #
458
+ def channel_pool
459
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
460
+ end
461
+
462
+ ##
463
+ # Configuration RPC class for the DataFoundryService API.
464
+ #
465
+ # Includes fields providing the configuration for each RPC in this service.
466
+ # Each configuration object is of type `Gapic::Config::Method` and includes
467
+ # the following configuration fields:
468
+ #
469
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
470
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
471
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
472
+ # include the following keys:
473
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
474
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
475
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
476
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
477
+ # trigger a retry.
478
+ #
479
+ class Rpcs
480
+ ##
481
+ # RPC-specific configuration for `generate_synthetic_data`
482
+ # @return [::Gapic::Config::Method]
483
+ #
484
+ attr_reader :generate_synthetic_data
485
+
486
+ # @private
487
+ def initialize parent_rpcs = nil
488
+ generate_synthetic_data_config = parent_rpcs.generate_synthetic_data if parent_rpcs.respond_to? :generate_synthetic_data
489
+ @generate_synthetic_data = ::Gapic::Config::Method.new generate_synthetic_data_config
490
+
491
+ yield self if block_given?
492
+ end
493
+ end
494
+ end
495
+ end
496
+ end
497
+ end
498
+ end
499
+ end
500
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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 AIPlatform
24
+ module V1
25
+ module DataFoundryService
26
+ # Credentials for the DataFoundryService 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