google-cloud-alloy_db-v1beta 0.15.0 → 0.16.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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb +131 -4
  3. data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb +124 -4
  4. data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/service_stub.rb +62 -0
  5. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/client.rb +519 -0
  6. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/credentials.rb +47 -0
  7. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/operations.rb +813 -0
  8. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/paths.rb +128 -0
  9. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest/client.rb +494 -0
  10. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest/operations.rb +913 -0
  11. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest/service_stub.rb +143 -0
  12. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest.rb +54 -0
  13. data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin.rb +56 -0
  14. data/lib/google/cloud/alloy_db/v1beta/rest.rb +1 -0
  15. data/lib/google/cloud/alloy_db/v1beta/version.rb +1 -1
  16. data/lib/google/cloud/alloy_db/v1beta.rb +1 -0
  17. data/lib/google/cloud/alloydb/v1beta/csql_service_pb.rb +53 -0
  18. data/lib/google/cloud/alloydb/v1beta/csql_service_services_pb.rb +45 -0
  19. data/lib/google/cloud/alloydb/v1beta/gemini_pb.rb +3 -1
  20. data/lib/google/cloud/alloydb/v1beta/resources_pb.rb +4 -1
  21. data/lib/google/cloud/alloydb/v1beta/service_pb.rb +5 -1
  22. data/lib/google/cloud/alloydb/v1beta/service_services_pb.rb +3 -0
  23. data/proto_docs/google/cloud/alloydb/v1beta/csql_service.rb +45 -0
  24. data/proto_docs/google/cloud/alloydb/v1beta/gemini.rb +19 -0
  25. data/proto_docs/google/cloud/alloydb/v1beta/resources.rb +89 -6
  26. data/proto_docs/google/cloud/alloydb/v1beta/service.rb +87 -3
  27. metadata +13 -1
@@ -0,0 +1,519 @@
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/alloydb/v1beta/csql_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module AlloyDB
27
+ module V1beta
28
+ module AlloyDBCloudSQLAdmin
29
+ ##
30
+ # Client for the AlloyDBCloudSQLAdmin service.
31
+ #
32
+ # Service for interactions with CloudSQL.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "alloydb.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :alloy_db_cloud_sql_admin_stub
45
+
46
+ ##
47
+ # Configure the AlloyDBCloudSQLAdmin Client class.
48
+ #
49
+ # See {::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all AlloyDBCloudSQLAdmin clients
55
+ # ::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::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", "AlloyDB", "V1beta"]
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 AlloyDBCloudSQLAdmin 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::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::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
+ @alloy_db_cloud_sql_admin_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new AlloyDBCloudSQLAdmin client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the AlloyDBCloudSQLAdmin 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/alloydb/v1beta/csql_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
+ @operations_client = Operations.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @config.endpoint
158
+ config.universe_domain = @config.universe_domain
159
+ end
160
+
161
+ @alloy_db_cloud_sql_admin_stub = ::Gapic::ServiceStub.new(
162
+ ::Google::Cloud::AlloyDB::V1beta::AlloyDBCSQLAdmin::Stub,
163
+ credentials: credentials,
164
+ endpoint: @config.endpoint,
165
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
166
+ universe_domain: @config.universe_domain,
167
+ channel_args: @config.channel_args,
168
+ interceptors: @config.interceptors,
169
+ channel_pool_config: @config.channel_pool,
170
+ logger: @config.logger
171
+ )
172
+
173
+ @alloy_db_cloud_sql_admin_stub.stub_logger&.info do |entry|
174
+ entry.set_system_name
175
+ entry.set_service
176
+ entry.message = "Created client for #{entry.service}"
177
+ entry.set_credentials_fields credentials
178
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
179
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
180
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
181
+ end
182
+
183
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
184
+ config.credentials = credentials
185
+ config.quota_project = @quota_project_id
186
+ config.endpoint = @alloy_db_cloud_sql_admin_stub.endpoint
187
+ config.universe_domain = @alloy_db_cloud_sql_admin_stub.universe_domain
188
+ config.logger = @alloy_db_cloud_sql_admin_stub.logger if config.respond_to? :logger=
189
+ end
190
+
191
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
192
+ config.credentials = credentials
193
+ config.quota_project = @quota_project_id
194
+ config.endpoint = @alloy_db_cloud_sql_admin_stub.endpoint
195
+ config.universe_domain = @alloy_db_cloud_sql_admin_stub.universe_domain
196
+ config.logger = @alloy_db_cloud_sql_admin_stub.logger if config.respond_to? :logger=
197
+ end
198
+ end
199
+
200
+ ##
201
+ # Get the associated client for long-running operations.
202
+ #
203
+ # @return [::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Operations]
204
+ #
205
+ attr_reader :operations_client
206
+
207
+ ##
208
+ # Get the associated client for mix-in of the Locations.
209
+ #
210
+ # @return [Google::Cloud::Location::Locations::Client]
211
+ #
212
+ attr_reader :location_client
213
+
214
+ ##
215
+ # Get the associated client for mix-in of the IAMPolicy.
216
+ #
217
+ # @return [Google::Iam::V1::IAMPolicy::Client]
218
+ #
219
+ attr_reader :iam_policy_client
220
+
221
+ ##
222
+ # The logger used for request/response debug logging.
223
+ #
224
+ # @return [Logger]
225
+ #
226
+ def logger
227
+ @alloy_db_cloud_sql_admin_stub.logger
228
+ end
229
+
230
+ # Service calls
231
+
232
+ ##
233
+ # Restores an AlloyDB cluster from a CloudSQL resource.
234
+ #
235
+ # @overload restore_from_cloud_sql(request, options = nil)
236
+ # Pass arguments to `restore_from_cloud_sql` via a request object, either of type
237
+ # {::Google::Cloud::AlloyDB::V1beta::RestoreFromCloudSQLRequest} or an equivalent Hash.
238
+ #
239
+ # @param request [::Google::Cloud::AlloyDB::V1beta::RestoreFromCloudSQLRequest, ::Hash]
240
+ # A request object representing the call parameters. Required. To specify no
241
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
242
+ # @param options [::Gapic::CallOptions, ::Hash]
243
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
244
+ #
245
+ # @overload restore_from_cloud_sql(cloudsql_backup_run_source: nil, parent: nil, cluster_id: nil, cluster: nil)
246
+ # Pass arguments to `restore_from_cloud_sql` via keyword arguments. Note that at
247
+ # least one keyword argument is required. To specify no parameters, or to keep all
248
+ # the default parameter values, pass an empty Hash as a request object (see above).
249
+ #
250
+ # @param cloudsql_backup_run_source [::Google::Cloud::AlloyDB::V1beta::CloudSQLBackupRunSource, ::Hash]
251
+ # Cluster created from CloudSQL backup run.
252
+ # @param parent [::String]
253
+ # Required. The location of the new cluster. For the required format, see the
254
+ # comment on Cluster.name field.
255
+ # @param cluster_id [::String]
256
+ # Required. ID of the requesting object.
257
+ # @param cluster [::Google::Cloud::AlloyDB::V1beta::Cluster, ::Hash]
258
+ # Required. The resource being created
259
+ #
260
+ # @yield [response, operation] Access the result along with the RPC operation
261
+ # @yieldparam response [::Gapic::Operation]
262
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
263
+ #
264
+ # @return [::Gapic::Operation]
265
+ #
266
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
267
+ #
268
+ # @example Basic example
269
+ # require "google/cloud/alloy_db/v1beta"
270
+ #
271
+ # # Create a client object. The client can be reused for multiple calls.
272
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client.new
273
+ #
274
+ # # Create a request. To set request fields, pass in keyword arguments.
275
+ # request = Google::Cloud::AlloyDB::V1beta::RestoreFromCloudSQLRequest.new
276
+ #
277
+ # # Call the restore_from_cloud_sql method.
278
+ # result = client.restore_from_cloud_sql request
279
+ #
280
+ # # The returned object is of type Gapic::Operation. You can use it to
281
+ # # check the status of an operation, cancel it, or wait for results.
282
+ # # Here is how to wait for a response.
283
+ # result.wait_until_done! timeout: 60
284
+ # if result.response?
285
+ # p result.response
286
+ # else
287
+ # puts "No response received."
288
+ # end
289
+ #
290
+ def restore_from_cloud_sql request, options = nil
291
+ raise ::ArgumentError, "request must be provided" if request.nil?
292
+
293
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::RestoreFromCloudSQLRequest
294
+
295
+ # Converts hash and nil to an options object
296
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
297
+
298
+ # Customize the options with defaults
299
+ metadata = @config.rpcs.restore_from_cloud_sql.metadata.to_h
300
+
301
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
302
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
303
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
304
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
305
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
306
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
+
308
+ header_params = {}
309
+ if request.parent
310
+ header_params["parent"] = request.parent
311
+ end
312
+
313
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
314
+ metadata[:"x-goog-request-params"] ||= request_params_header
315
+
316
+ options.apply_defaults timeout: @config.rpcs.restore_from_cloud_sql.timeout,
317
+ metadata: metadata,
318
+ retry_policy: @config.rpcs.restore_from_cloud_sql.retry_policy
319
+
320
+ options.apply_defaults timeout: @config.timeout,
321
+ metadata: @config.metadata,
322
+ retry_policy: @config.retry_policy
323
+
324
+ @alloy_db_cloud_sql_admin_stub.call_rpc :restore_from_cloud_sql, request, options: options do |response, operation|
325
+ response = ::Gapic::Operation.new response, @operations_client, options: options
326
+ yield response, operation if block_given?
327
+ throw :response, response
328
+ end
329
+ rescue ::GRPC::BadStatus => e
330
+ raise ::Google::Cloud::Error.from_error(e)
331
+ end
332
+
333
+ ##
334
+ # Configuration class for the AlloyDBCloudSQLAdmin API.
335
+ #
336
+ # This class represents the configuration for AlloyDBCloudSQLAdmin,
337
+ # providing control over timeouts, retry behavior, logging, transport
338
+ # parameters, and other low-level controls. Certain parameters can also be
339
+ # applied individually to specific RPCs. See
340
+ # {::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client::Configuration::Rpcs}
341
+ # for a list of RPCs that can be configured independently.
342
+ #
343
+ # Configuration can be applied globally to all clients, or to a single client
344
+ # on construction.
345
+ #
346
+ # @example
347
+ #
348
+ # # Modify the global config, setting the timeout for
349
+ # # restore_from_cloud_sql to 20 seconds,
350
+ # # and all remaining timeouts to 10 seconds.
351
+ # ::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client.configure do |config|
352
+ # config.timeout = 10.0
353
+ # config.rpcs.restore_from_cloud_sql.timeout = 20.0
354
+ # end
355
+ #
356
+ # # Apply the above configuration only to a new client.
357
+ # client = ::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::Client.new do |config|
358
+ # config.timeout = 10.0
359
+ # config.rpcs.restore_from_cloud_sql.timeout = 20.0
360
+ # end
361
+ #
362
+ # @!attribute [rw] endpoint
363
+ # A custom service endpoint, as a hostname or hostname:port. The default is
364
+ # nil, indicating to use the default endpoint in the current universe domain.
365
+ # @return [::String,nil]
366
+ # @!attribute [rw] credentials
367
+ # Credentials to send with calls. You may provide any of the following types:
368
+ # * (`String`) The path to a service account key file in JSON format
369
+ # * (`Hash`) A service account key as a Hash
370
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
371
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
372
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
373
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
374
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
375
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
376
+ # * (`nil`) indicating no credentials
377
+ #
378
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
379
+ # external source for authentication to Google Cloud, you must validate it before
380
+ # providing it to a Google API client library. Providing an unvalidated credential
381
+ # configuration to Google APIs can compromise the security of your systems and data.
382
+ # For more information, refer to [Validate credential configurations from external
383
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
384
+ # @return [::Object]
385
+ # @!attribute [rw] scope
386
+ # The OAuth scopes
387
+ # @return [::Array<::String>]
388
+ # @!attribute [rw] lib_name
389
+ # The library name as recorded in instrumentation and logging
390
+ # @return [::String]
391
+ # @!attribute [rw] lib_version
392
+ # The library version as recorded in instrumentation and logging
393
+ # @return [::String]
394
+ # @!attribute [rw] channel_args
395
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
396
+ # `GRPC::Core::Channel` object is provided as the credential.
397
+ # @return [::Hash]
398
+ # @!attribute [rw] interceptors
399
+ # An array of interceptors that are run before calls are executed.
400
+ # @return [::Array<::GRPC::ClientInterceptor>]
401
+ # @!attribute [rw] timeout
402
+ # The call timeout in seconds.
403
+ # @return [::Numeric]
404
+ # @!attribute [rw] metadata
405
+ # Additional gRPC headers to be sent with the call.
406
+ # @return [::Hash{::Symbol=>::String}]
407
+ # @!attribute [rw] retry_policy
408
+ # The retry policy. The value is a hash with the following keys:
409
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
410
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
411
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
412
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
413
+ # trigger a retry.
414
+ # @return [::Hash]
415
+ # @!attribute [rw] quota_project
416
+ # A separate project against which to charge quota.
417
+ # @return [::String]
418
+ # @!attribute [rw] universe_domain
419
+ # The universe domain within which to make requests. This determines the
420
+ # default endpoint URL. The default value of nil uses the environment
421
+ # universe (usually the default "googleapis.com" universe).
422
+ # @return [::String,nil]
423
+ # @!attribute [rw] logger
424
+ # A custom logger to use for request/response debug logging, or the value
425
+ # `:default` (the default) to construct a default logger, or `nil` to
426
+ # explicitly disable logging.
427
+ # @return [::Logger,:default,nil]
428
+ #
429
+ class Configuration
430
+ extend ::Gapic::Config
431
+
432
+ # @private
433
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
434
+ DEFAULT_ENDPOINT = "alloydb.googleapis.com"
435
+
436
+ config_attr :endpoint, nil, ::String, nil
437
+ config_attr :credentials, nil do |value|
438
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
439
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
440
+ allowed.any? { |klass| klass === value }
441
+ end
442
+ config_attr :scope, nil, ::String, ::Array, nil
443
+ config_attr :lib_name, nil, ::String, nil
444
+ config_attr :lib_version, nil, ::String, nil
445
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
446
+ config_attr :interceptors, nil, ::Array, nil
447
+ config_attr :timeout, nil, ::Numeric, nil
448
+ config_attr :metadata, nil, ::Hash, nil
449
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
450
+ config_attr :quota_project, nil, ::String, nil
451
+ config_attr :universe_domain, nil, ::String, nil
452
+ config_attr :logger, :default, ::Logger, nil, :default
453
+
454
+ # @private
455
+ def initialize parent_config = nil
456
+ @parent_config = parent_config unless parent_config.nil?
457
+
458
+ yield self if block_given?
459
+ end
460
+
461
+ ##
462
+ # Configurations for individual RPCs
463
+ # @return [Rpcs]
464
+ #
465
+ def rpcs
466
+ @rpcs ||= begin
467
+ parent_rpcs = nil
468
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
469
+ Rpcs.new parent_rpcs
470
+ end
471
+ end
472
+
473
+ ##
474
+ # Configuration for the channel pool
475
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
476
+ #
477
+ def channel_pool
478
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
479
+ end
480
+
481
+ ##
482
+ # Configuration RPC class for the AlloyDBCloudSQLAdmin API.
483
+ #
484
+ # Includes fields providing the configuration for each RPC in this service.
485
+ # Each configuration object is of type `Gapic::Config::Method` and includes
486
+ # the following configuration fields:
487
+ #
488
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
489
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
490
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
491
+ # include the following keys:
492
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
493
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
494
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
495
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
496
+ # trigger a retry.
497
+ #
498
+ class Rpcs
499
+ ##
500
+ # RPC-specific configuration for `restore_from_cloud_sql`
501
+ # @return [::Gapic::Config::Method]
502
+ #
503
+ attr_reader :restore_from_cloud_sql
504
+
505
+ # @private
506
+ def initialize parent_rpcs = nil
507
+ restore_from_cloud_sql_config = parent_rpcs.restore_from_cloud_sql if parent_rpcs.respond_to? :restore_from_cloud_sql
508
+ @restore_from_cloud_sql = ::Gapic::Config::Method.new restore_from_cloud_sql_config
509
+
510
+ yield self if block_given?
511
+ end
512
+ end
513
+ end
514
+ end
515
+ end
516
+ end
517
+ end
518
+ end
519
+ 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 AlloyDB
24
+ module V1beta
25
+ module AlloyDBCloudSQLAdmin
26
+ # Credentials for the AlloyDBCloudSQLAdmin 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