Class: Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration
- Inherits:
-
Object
- Object
- Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration
- Extended by:
- Gapic::Config
- Defined in:
- lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb
Overview
Configuration class for the DatabaseAdmin API.
This class represents the configuration for DatabaseAdmin, providing control over timeouts, retry behavior, logging, transport parameters, and other low-level controls. Certain parameters can also be applied individually to specific RPCs. See Rpcs for a list of RPCs that can be configured independently.
Configuration can be applied globally to all clients, or to a single client on construction.
Defined Under Namespace
Classes: Rpcs
Instance Attribute Summary collapse
-
#channel_args ⇒ ::Hash
Extra parameters passed to the gRPC channel.
-
#credentials ⇒ ::Object
Credentials to send with calls.
-
#endpoint ⇒ ::String?
A custom service endpoint, as a hostname or hostname:port.
-
#interceptors ⇒ ::Array<::GRPC::ClientInterceptor>
An array of interceptors that are run before calls are executed.
-
#lib_name ⇒ ::String
The library name as recorded in instrumentation and logging.
-
#lib_version ⇒ ::String
The library version as recorded in instrumentation and logging.
-
#logger ⇒ ::Logger, ...
A custom logger to use for request/response debug logging, or the value
:default
(the default) to construct a default logger, ornil
to explicitly disable logging. -
#metadata ⇒ ::Hash{::Symbol=>::String}
Additional gRPC headers to be sent with the call.
-
#quota_project ⇒ ::String
A separate project against which to charge quota.
-
#retry_policy ⇒ ::Hash
The retry policy.
-
#scope ⇒ ::Array<::String>
The OAuth scopes.
-
#timeout ⇒ ::Numeric
The call timeout in seconds.
-
#universe_domain ⇒ ::String?
The universe domain within which to make requests.
Instance Method Summary collapse
-
#channel_pool ⇒ ::Gapic::ServiceStub::ChannelPool::Configuration
Configuration for the channel pool.
-
#rpcs ⇒ Rpcs
Configurations for individual RPCs.
Instance Attribute Details
#channel_args ⇒ ::Hash
Extra parameters passed to the gRPC channel. Note: this is ignored if a
GRPC::Core::Channel
object is provided as the credential.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#credentials ⇒ ::Object
Credentials to send with calls. You may provide any of the following types:
- (
String
) The path to a service account key file in JSON format - (
Hash
) A service account key as a Hash - (
Google::Auth::Credentials
) A googleauth credentials object (see the googleauth docs) - (
Signet::OAuth2::Client
) A signet oauth2 client object (see the signet docs) - (
GRPC::Core::Channel
) a gRPC channel with included credentials - (
GRPC::Core::ChannelCredentials
) a gRPC credentails object - (
nil
) indicating no credentials
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#endpoint ⇒ ::String?
A custom service endpoint, as a hostname or hostname:port. The default is nil, indicating to use the default endpoint in the current universe domain.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#interceptors ⇒ ::Array<::GRPC::ClientInterceptor>
An array of interceptors that are run before calls are executed.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#lib_name ⇒ ::String
The library name as recorded in instrumentation and logging
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#lib_version ⇒ ::String
The library version as recorded in instrumentation and logging
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#logger ⇒ ::Logger, ...
A custom logger to use for request/response debug logging, or the value
:default
(the default) to construct a default logger, or nil
to
explicitly disable logging.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#metadata ⇒ ::Hash{::Symbol=>::String}
Additional gRPC headers to be sent with the call.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#quota_project ⇒ ::String
A separate project against which to charge quota.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#retry_policy ⇒ ::Hash
The retry policy. The value is a hash with the following keys:
-
:initial_delay
(type:Numeric
) - The initial delay in seconds. -
:max_delay
(type:Numeric
) - The max delay in seconds. -
:multiplier
(type:Numeric
) - The incremental backoff multiplier. -
:retry_codes
(type:Array<String>
) - The error codes that should trigger a retry.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#scope ⇒ ::Array<::String>
The OAuth scopes
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#timeout ⇒ ::Numeric
The call timeout in seconds.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
#universe_domain ⇒ ::String?
The universe domain within which to make requests. This determines the default endpoint URL. The default value of nil uses the environment universe (usually the default "googleapis.com" universe).
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3170 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "spanner.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the DatabaseAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `list_databases` # @return [::Gapic::Config::Method] # attr_reader :list_databases ## # RPC-specific configuration for `create_database` # @return [::Gapic::Config::Method] # attr_reader :create_database ## # RPC-specific configuration for `get_database` # @return [::Gapic::Config::Method] # attr_reader :get_database ## # RPC-specific configuration for `update_database` # @return [::Gapic::Config::Method] # attr_reader :update_database ## # RPC-specific configuration for `update_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :update_database_ddl ## # RPC-specific configuration for `drop_database` # @return [::Gapic::Config::Method] # attr_reader :drop_database ## # RPC-specific configuration for `get_database_ddl` # @return [::Gapic::Config::Method] # attr_reader :get_database_ddl ## # RPC-specific configuration for `set_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :set_iam_policy ## # RPC-specific configuration for `get_iam_policy` # @return [::Gapic::Config::Method] # attr_reader :get_iam_policy ## # RPC-specific configuration for `test_iam_permissions` # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions ## # RPC-specific configuration for `create_backup` # @return [::Gapic::Config::Method] # attr_reader :create_backup ## # RPC-specific configuration for `copy_backup` # @return [::Gapic::Config::Method] # attr_reader :copy_backup ## # RPC-specific configuration for `get_backup` # @return [::Gapic::Config::Method] # attr_reader :get_backup ## # RPC-specific configuration for `update_backup` # @return [::Gapic::Config::Method] # attr_reader :update_backup ## # RPC-specific configuration for `delete_backup` # @return [::Gapic::Config::Method] # attr_reader :delete_backup ## # RPC-specific configuration for `list_backups` # @return [::Gapic::Config::Method] # attr_reader :list_backups ## # RPC-specific configuration for `restore_database` # @return [::Gapic::Config::Method] # attr_reader :restore_database ## # RPC-specific configuration for `list_database_operations` # @return [::Gapic::Config::Method] # attr_reader :list_database_operations ## # RPC-specific configuration for `list_backup_operations` # @return [::Gapic::Config::Method] # attr_reader :list_backup_operations ## # RPC-specific configuration for `list_database_roles` # @return [::Gapic::Config::Method] # attr_reader :list_database_roles ## # RPC-specific configuration for `create_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :create_backup_schedule ## # RPC-specific configuration for `get_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :get_backup_schedule ## # RPC-specific configuration for `update_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :update_backup_schedule ## # RPC-specific configuration for `delete_backup_schedule` # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule ## # RPC-specific configuration for `list_backup_schedules` # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules # @private def initialize parent_rpcs = nil list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases @list_databases = ::Gapic::Config::Method.new list_databases_config create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database @create_database = ::Gapic::Config::Method.new create_database_config get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database @get_database = ::Gapic::Config::Method.new get_database_config update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database @update_database = ::Gapic::Config::Method.new update_database_config update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database @drop_database = ::Gapic::Config::Method.new drop_database_config get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config = parent_rpcs. if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup @create_backup = ::Gapic::Config::Method.new create_backup_config copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup @copy_backup = ::Gapic::Config::Method.new copy_backup_config get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup @get_backup = ::Gapic::Config::Method.new get_backup_config update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup @update_backup = ::Gapic::Config::Method.new update_backup_config delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup @delete_backup = ::Gapic::Config::Method.new delete_backup_config list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups @list_backups = ::Gapic::Config::Method.new list_backups_config restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database @restore_database = ::Gapic::Config::Method.new restore_database_config list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config yield self if block_given? end end end |
Instance Method Details
#channel_pool ⇒ ::Gapic::ServiceStub::ChannelPool::Configuration
Configuration for the channel pool
3218 3219 3220 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3218 def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end |
#rpcs ⇒ Rpcs
Configurations for individual RPCs
3206 3207 3208 3209 3210 3211 3212 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb', line 3206 def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end |