google-cloud-alloy_db-v1beta 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -113,6 +113,16 @@ module Google
113
113
  initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
114
114
  }
115
115
 
116
+ default_config.rpcs.list_users.timeout = 60.0
117
+ default_config.rpcs.list_users.retry_policy = {
118
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
119
+ }
120
+
121
+ default_config.rpcs.get_user.timeout = 60.0
122
+ default_config.rpcs.get_user.retry_policy = {
123
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
124
+ }
125
+
116
126
  default_config
117
127
  end
118
128
  yield @configure if block_given?
@@ -205,7 +215,8 @@ module Google
205
215
  credentials: credentials,
206
216
  endpoint: @config.endpoint,
207
217
  channel_args: @config.channel_args,
208
- interceptors: @config.interceptors
218
+ interceptors: @config.interceptors,
219
+ channel_pool_config: @config.channel_pool
209
220
  )
210
221
  end
211
222
 
@@ -347,7 +358,7 @@ module Google
347
358
  # @param options [::Gapic::CallOptions, ::Hash]
348
359
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
349
360
  #
350
- # @overload get_cluster(name: nil)
361
+ # @overload get_cluster(name: nil, view: nil)
351
362
  # Pass arguments to `get_cluster` via keyword arguments. Note that at
352
363
  # least one keyword argument is required. To specify no parameters, or to keep all
353
364
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -355,6 +366,9 @@ module Google
355
366
  # @param name [::String]
356
367
  # Required. The name of the resource. For the required format, see the
357
368
  # comment on the Cluster.name field.
369
+ # @param view [::Google::Cloud::AlloyDB::V1beta::ClusterView]
370
+ # Optional. The view of the cluster to return. Returns all default fields if
371
+ # not set.
358
372
  #
359
373
  # @yield [response, operation] Access the result along with the RPC operation
360
374
  # @yieldparam response [::Google::Cloud::AlloyDB::V1beta::Cluster]
@@ -439,7 +453,7 @@ module Google
439
453
  # the default parameter values, pass an empty Hash as a request object (see above).
440
454
  #
441
455
  # @param parent [::String]
442
- # Required. The name of the parent resource. For the required format, see the
456
+ # Required. The location of the new cluster. For the required format, see the
443
457
  # comment on the Cluster.name field.
444
458
  # @param cluster_id [::String]
445
459
  # Required. ID of the requesting object.
@@ -1034,8 +1048,8 @@ module Google
1034
1048
  # the default parameter values, pass an empty Hash as a request object (see above).
1035
1049
  #
1036
1050
  # @param parent [::String]
1037
- # Required. The name of the parent resource (the primary cluster). For the
1038
- # required format, see the comment on the Cluster.name field.
1051
+ # Required. The location of the new cluster. For the required
1052
+ # format, see the comment on the Cluster.name field.
1039
1053
  # @param cluster_id [::String]
1040
1054
  # Required. ID of the requesting object (the secondary cluster).
1041
1055
  # @param cluster [::Google::Cloud::AlloyDB::V1beta::Cluster, ::Hash]
@@ -2021,6 +2035,121 @@ module Google
2021
2035
  raise ::Google::Cloud::Error.from_error(e)
2022
2036
  end
2023
2037
 
2038
+ ##
2039
+ # Injects fault in an instance.
2040
+ # Imperative only.
2041
+ #
2042
+ # @overload inject_fault(request, options = nil)
2043
+ # Pass arguments to `inject_fault` via a request object, either of type
2044
+ # {::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest} or an equivalent Hash.
2045
+ #
2046
+ # @param request [::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest, ::Hash]
2047
+ # A request object representing the call parameters. Required. To specify no
2048
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2049
+ # @param options [::Gapic::CallOptions, ::Hash]
2050
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2051
+ #
2052
+ # @overload inject_fault(fault_type: nil, name: nil, request_id: nil, validate_only: nil)
2053
+ # Pass arguments to `inject_fault` via keyword arguments. Note that at
2054
+ # least one keyword argument is required. To specify no parameters, or to keep all
2055
+ # the default parameter values, pass an empty Hash as a request object (see above).
2056
+ #
2057
+ # @param fault_type [::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest::FaultType]
2058
+ # Required. The type of fault to be injected in an instance.
2059
+ # @param name [::String]
2060
+ # Required. The name of the resource. For the required format, see the
2061
+ # comment on the Instance.name field.
2062
+ # @param request_id [::String]
2063
+ # Optional. An optional request ID to identify requests. Specify a unique
2064
+ # request ID so that if you must retry your request, the server will know to
2065
+ # ignore the request if it has already been completed. The server will
2066
+ # guarantee that for at least 60 minutes after the first request.
2067
+ #
2068
+ # For example, consider a situation where you make an initial request and
2069
+ # the request times out. If you make the request again with the same request
2070
+ # ID, the server can check if original operation with the same request ID
2071
+ # was received, and if so, will ignore the second request. This prevents
2072
+ # clients from accidentally creating duplicate commitments.
2073
+ #
2074
+ # The request ID must be a valid UUID with the exception that zero UUID is
2075
+ # not supported (00000000-0000-0000-0000-000000000000).
2076
+ # @param validate_only [::Boolean]
2077
+ # Optional. If set, performs request validation (e.g. permission checks and
2078
+ # any other type of validation), but do not actually execute the fault
2079
+ # injection.
2080
+ #
2081
+ # @yield [response, operation] Access the result along with the RPC operation
2082
+ # @yieldparam response [::Gapic::Operation]
2083
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2084
+ #
2085
+ # @return [::Gapic::Operation]
2086
+ #
2087
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2088
+ #
2089
+ # @example Basic example
2090
+ # require "google/cloud/alloy_db/v1beta"
2091
+ #
2092
+ # # Create a client object. The client can be reused for multiple calls.
2093
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
2094
+ #
2095
+ # # Create a request. To set request fields, pass in keyword arguments.
2096
+ # request = Google::Cloud::AlloyDB::V1beta::InjectFaultRequest.new
2097
+ #
2098
+ # # Call the inject_fault method.
2099
+ # result = client.inject_fault request
2100
+ #
2101
+ # # The returned object is of type Gapic::Operation. You can use it to
2102
+ # # check the status of an operation, cancel it, or wait for results.
2103
+ # # Here is how to wait for a response.
2104
+ # result.wait_until_done! timeout: 60
2105
+ # if result.response?
2106
+ # p result.response
2107
+ # else
2108
+ # puts "No response received."
2109
+ # end
2110
+ #
2111
+ def inject_fault request, options = nil
2112
+ raise ::ArgumentError, "request must be provided" if request.nil?
2113
+
2114
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest
2115
+
2116
+ # Converts hash and nil to an options object
2117
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2118
+
2119
+ # Customize the options with defaults
2120
+ metadata = @config.rpcs.inject_fault.metadata.to_h
2121
+
2122
+ # Set x-goog-api-client and x-goog-user-project headers
2123
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2124
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2125
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
2126
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2127
+
2128
+ header_params = {}
2129
+ if request.name
2130
+ header_params["name"] = request.name
2131
+ end
2132
+
2133
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2134
+ metadata[:"x-goog-request-params"] ||= request_params_header
2135
+
2136
+ options.apply_defaults timeout: @config.rpcs.inject_fault.timeout,
2137
+ metadata: metadata,
2138
+ retry_policy: @config.rpcs.inject_fault.retry_policy
2139
+
2140
+ options.apply_defaults timeout: @config.timeout,
2141
+ metadata: @config.metadata,
2142
+ retry_policy: @config.retry_policy
2143
+
2144
+ @alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
2145
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2146
+ yield response, operation if block_given?
2147
+ return response
2148
+ end
2149
+ rescue ::GRPC::BadStatus => e
2150
+ raise ::Google::Cloud::Error.from_error(e)
2151
+ end
2152
+
2024
2153
  ##
2025
2154
  # Restart an Instance in a cluster.
2026
2155
  # Imperative only.
@@ -2783,7 +2912,7 @@ module Google
2783
2912
  # @param options [::Gapic::CallOptions, ::Hash]
2784
2913
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2785
2914
  #
2786
- # @overload generate_client_certificate(parent: nil, request_id: nil, pem_csr: nil, cert_duration: nil)
2915
+ # @overload generate_client_certificate(parent: nil, request_id: nil, pem_csr: nil, cert_duration: nil, public_key: nil)
2787
2916
  # Pass arguments to `generate_client_certificate` via keyword arguments. Note that at
2788
2917
  # least one keyword argument is required. To specify no parameters, or to keep all
2789
2918
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2813,6 +2942,8 @@ module Google
2813
2942
  # 24 hours. The endpoint may or may not honor the hint. If the hint is left
2814
2943
  # unspecified or is not honored, then the endpoint will pick an appropriate
2815
2944
  # default duration.
2945
+ # @param public_key [::String]
2946
+ # Optional. The public key from the client.
2816
2947
  #
2817
2948
  # @yield [response, operation] Access the result along with the RPC operation
2818
2949
  # @yieldparam response [::Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateResponse]
@@ -2979,128 +3110,640 @@ module Google
2979
3110
  end
2980
3111
 
2981
3112
  ##
2982
- # Configuration class for the AlloyDBAdmin API.
3113
+ # Lists Users in a given project and location.
2983
3114
  #
2984
- # This class represents the configuration for AlloyDBAdmin,
2985
- # providing control over timeouts, retry behavior, logging, transport
2986
- # parameters, and other low-level controls. Certain parameters can also be
2987
- # applied individually to specific RPCs. See
2988
- # {::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client::Configuration::Rpcs}
2989
- # for a list of RPCs that can be configured independently.
3115
+ # @overload list_users(request, options = nil)
3116
+ # Pass arguments to `list_users` via a request object, either of type
3117
+ # {::Google::Cloud::AlloyDB::V1beta::ListUsersRequest} or an equivalent Hash.
2990
3118
  #
2991
- # Configuration can be applied globally to all clients, or to a single client
2992
- # on construction.
3119
+ # @param request [::Google::Cloud::AlloyDB::V1beta::ListUsersRequest, ::Hash]
3120
+ # A request object representing the call parameters. Required. To specify no
3121
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3122
+ # @param options [::Gapic::CallOptions, ::Hash]
3123
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2993
3124
  #
2994
- # @example
3125
+ # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3126
+ # Pass arguments to `list_users` via keyword arguments. Note that at
3127
+ # least one keyword argument is required. To specify no parameters, or to keep all
3128
+ # the default parameter values, pass an empty Hash as a request object (see above).
2995
3129
  #
2996
- # # Modify the global config, setting the timeout for
2997
- # # list_clusters to 20 seconds,
2998
- # # and all remaining timeouts to 10 seconds.
2999
- # ::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.configure do |config|
3000
- # config.timeout = 10.0
3001
- # config.rpcs.list_clusters.timeout = 20.0
3002
- # end
3130
+ # @param parent [::String]
3131
+ # Required. Parent value for ListUsersRequest
3132
+ # @param page_size [::Integer]
3133
+ # Optional. Requested page size. Server may return fewer items than
3134
+ # requested. If unspecified, server will pick an appropriate default.
3135
+ # @param page_token [::String]
3136
+ # Optional. A token identifying a page of results the server should return.
3137
+ # @param filter [::String]
3138
+ # Optional. Filtering results
3139
+ # @param order_by [::String]
3140
+ # Optional. Hint for how to order the results
3003
3141
  #
3004
- # # Apply the above configuration only to a new client.
3005
- # client = ::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new do |config|
3006
- # config.timeout = 10.0
3007
- # config.rpcs.list_clusters.timeout = 20.0
3008
- # end
3142
+ # @yield [response, operation] Access the result along with the RPC operation
3143
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AlloyDB::V1beta::User>]
3144
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3009
3145
  #
3010
- # @!attribute [rw] endpoint
3011
- # The hostname or hostname:port of the service endpoint.
3012
- # Defaults to `"alloydb.googleapis.com"`.
3013
- # @return [::String]
3014
- # @!attribute [rw] credentials
3015
- # Credentials to send with calls. You may provide any of the following types:
3016
- # * (`String`) The path to a service account key file in JSON format
3017
- # * (`Hash`) A service account key as a Hash
3018
- # * (`Google::Auth::Credentials`) A googleauth credentials object
3019
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3020
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3021
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3022
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3023
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3024
- # * (`nil`) indicating no credentials
3025
- # @return [::Object]
3026
- # @!attribute [rw] scope
3027
- # The OAuth scopes
3028
- # @return [::Array<::String>]
3029
- # @!attribute [rw] lib_name
3030
- # The library name as recorded in instrumentation and logging
3031
- # @return [::String]
3032
- # @!attribute [rw] lib_version
3033
- # The library version as recorded in instrumentation and logging
3034
- # @return [::String]
3035
- # @!attribute [rw] channel_args
3036
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
3037
- # `GRPC::Core::Channel` object is provided as the credential.
3038
- # @return [::Hash]
3039
- # @!attribute [rw] interceptors
3040
- # An array of interceptors that are run before calls are executed.
3041
- # @return [::Array<::GRPC::ClientInterceptor>]
3042
- # @!attribute [rw] timeout
3043
- # The call timeout in seconds.
3044
- # @return [::Numeric]
3045
- # @!attribute [rw] metadata
3046
- # Additional gRPC headers to be sent with the call.
3047
- # @return [::Hash{::Symbol=>::String}]
3048
- # @!attribute [rw] retry_policy
3049
- # The retry policy. The value is a hash with the following keys:
3050
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3051
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3052
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3053
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3054
- # trigger a retry.
3055
- # @return [::Hash]
3056
- # @!attribute [rw] quota_project
3057
- # A separate project against which to charge quota.
3058
- # @return [::String]
3146
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AlloyDB::V1beta::User>]
3059
3147
  #
3060
- class Configuration
3061
- extend ::Gapic::Config
3148
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3149
+ #
3150
+ # @example Basic example
3151
+ # require "google/cloud/alloy_db/v1beta"
3152
+ #
3153
+ # # Create a client object. The client can be reused for multiple calls.
3154
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
3155
+ #
3156
+ # # Create a request. To set request fields, pass in keyword arguments.
3157
+ # request = Google::Cloud::AlloyDB::V1beta::ListUsersRequest.new
3158
+ #
3159
+ # # Call the list_users method.
3160
+ # result = client.list_users request
3161
+ #
3162
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3163
+ # # over elements, and API calls will be issued to fetch pages as needed.
3164
+ # result.each do |item|
3165
+ # # Each element is of type ::Google::Cloud::AlloyDB::V1beta::User.
3166
+ # p item
3167
+ # end
3168
+ #
3169
+ def list_users request, options = nil
3170
+ raise ::ArgumentError, "request must be provided" if request.nil?
3062
3171
 
3063
- DEFAULT_ENDPOINT = "alloydb.googleapis.com"
3172
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::ListUsersRequest
3064
3173
 
3065
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3066
- config_attr :credentials, nil do |value|
3067
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3068
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
3069
- allowed.any? { |klass| klass === value }
3070
- end
3071
- config_attr :scope, nil, ::String, ::Array, nil
3072
- config_attr :lib_name, nil, ::String, nil
3073
- config_attr :lib_version, nil, ::String, nil
3074
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
3075
- config_attr :interceptors, nil, ::Array, nil
3076
- config_attr :timeout, nil, ::Numeric, nil
3077
- config_attr :metadata, nil, ::Hash, nil
3078
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3079
- config_attr :quota_project, nil, ::String, nil
3174
+ # Converts hash and nil to an options object
3175
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3080
3176
 
3081
- # @private
3082
- def initialize parent_config = nil
3083
- @parent_config = parent_config unless parent_config.nil?
3177
+ # Customize the options with defaults
3178
+ metadata = @config.rpcs.list_users.metadata.to_h
3084
3179
 
3085
- yield self if block_given?
3086
- end
3180
+ # Set x-goog-api-client and x-goog-user-project headers
3181
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3182
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3183
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
3184
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3087
3185
 
3088
- ##
3089
- # Configurations for individual RPCs
3090
- # @return [Rpcs]
3091
- #
3092
- def rpcs
3093
- @rpcs ||= begin
3094
- parent_rpcs = nil
3095
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3096
- Rpcs.new parent_rpcs
3097
- end
3186
+ header_params = {}
3187
+ if request.parent
3188
+ header_params["parent"] = request.parent
3098
3189
  end
3099
3190
 
3100
- ##
3101
- # Configuration RPC class for the AlloyDBAdmin API.
3102
- #
3103
- # Includes fields providing the configuration for each RPC in this service.
3191
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3192
+ metadata[:"x-goog-request-params"] ||= request_params_header
3193
+
3194
+ options.apply_defaults timeout: @config.rpcs.list_users.timeout,
3195
+ metadata: metadata,
3196
+ retry_policy: @config.rpcs.list_users.retry_policy
3197
+
3198
+ options.apply_defaults timeout: @config.timeout,
3199
+ metadata: @config.metadata,
3200
+ retry_policy: @config.retry_policy
3201
+
3202
+ @alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
3203
+ response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
3204
+ yield response, operation if block_given?
3205
+ return response
3206
+ end
3207
+ rescue ::GRPC::BadStatus => e
3208
+ raise ::Google::Cloud::Error.from_error(e)
3209
+ end
3210
+
3211
+ ##
3212
+ # Gets details of a single User.
3213
+ #
3214
+ # @overload get_user(request, options = nil)
3215
+ # Pass arguments to `get_user` via a request object, either of type
3216
+ # {::Google::Cloud::AlloyDB::V1beta::GetUserRequest} or an equivalent Hash.
3217
+ #
3218
+ # @param request [::Google::Cloud::AlloyDB::V1beta::GetUserRequest, ::Hash]
3219
+ # A request object representing the call parameters. Required. To specify no
3220
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3221
+ # @param options [::Gapic::CallOptions, ::Hash]
3222
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3223
+ #
3224
+ # @overload get_user(name: nil)
3225
+ # Pass arguments to `get_user` via keyword arguments. Note that at
3226
+ # least one keyword argument is required. To specify no parameters, or to keep all
3227
+ # the default parameter values, pass an empty Hash as a request object (see above).
3228
+ #
3229
+ # @param name [::String]
3230
+ # Required. The name of the resource. For the required format, see the
3231
+ # comment on the User.name field.
3232
+ #
3233
+ # @yield [response, operation] Access the result along with the RPC operation
3234
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1beta::User]
3235
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3236
+ #
3237
+ # @return [::Google::Cloud::AlloyDB::V1beta::User]
3238
+ #
3239
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3240
+ #
3241
+ # @example Basic example
3242
+ # require "google/cloud/alloy_db/v1beta"
3243
+ #
3244
+ # # Create a client object. The client can be reused for multiple calls.
3245
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
3246
+ #
3247
+ # # Create a request. To set request fields, pass in keyword arguments.
3248
+ # request = Google::Cloud::AlloyDB::V1beta::GetUserRequest.new
3249
+ #
3250
+ # # Call the get_user method.
3251
+ # result = client.get_user request
3252
+ #
3253
+ # # The returned object is of type Google::Cloud::AlloyDB::V1beta::User.
3254
+ # p result
3255
+ #
3256
+ def get_user request, options = nil
3257
+ raise ::ArgumentError, "request must be provided" if request.nil?
3258
+
3259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::GetUserRequest
3260
+
3261
+ # Converts hash and nil to an options object
3262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3263
+
3264
+ # Customize the options with defaults
3265
+ metadata = @config.rpcs.get_user.metadata.to_h
3266
+
3267
+ # Set x-goog-api-client and x-goog-user-project headers
3268
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3270
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
3271
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3272
+
3273
+ header_params = {}
3274
+ if request.name
3275
+ header_params["name"] = request.name
3276
+ end
3277
+
3278
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3279
+ metadata[:"x-goog-request-params"] ||= request_params_header
3280
+
3281
+ options.apply_defaults timeout: @config.rpcs.get_user.timeout,
3282
+ metadata: metadata,
3283
+ retry_policy: @config.rpcs.get_user.retry_policy
3284
+
3285
+ options.apply_defaults timeout: @config.timeout,
3286
+ metadata: @config.metadata,
3287
+ retry_policy: @config.retry_policy
3288
+
3289
+ @alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
3290
+ yield response, operation if block_given?
3291
+ return response
3292
+ end
3293
+ rescue ::GRPC::BadStatus => e
3294
+ raise ::Google::Cloud::Error.from_error(e)
3295
+ end
3296
+
3297
+ ##
3298
+ # Creates a new User in a given project, location, and cluster.
3299
+ #
3300
+ # @overload create_user(request, options = nil)
3301
+ # Pass arguments to `create_user` via a request object, either of type
3302
+ # {::Google::Cloud::AlloyDB::V1beta::CreateUserRequest} or an equivalent Hash.
3303
+ #
3304
+ # @param request [::Google::Cloud::AlloyDB::V1beta::CreateUserRequest, ::Hash]
3305
+ # A request object representing the call parameters. Required. To specify no
3306
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3307
+ # @param options [::Gapic::CallOptions, ::Hash]
3308
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3309
+ #
3310
+ # @overload create_user(parent: nil, user_id: nil, user: nil, request_id: nil, validate_only: nil)
3311
+ # Pass arguments to `create_user` via keyword arguments. Note that at
3312
+ # least one keyword argument is required. To specify no parameters, or to keep all
3313
+ # the default parameter values, pass an empty Hash as a request object (see above).
3314
+ #
3315
+ # @param parent [::String]
3316
+ # Required. Value for parent.
3317
+ # @param user_id [::String]
3318
+ # Required. ID of the requesting object.
3319
+ # @param user [::Google::Cloud::AlloyDB::V1beta::User, ::Hash]
3320
+ # Required. The resource being created
3321
+ # @param request_id [::String]
3322
+ # Optional. An optional request ID to identify requests. Specify a unique
3323
+ # request ID so that if you must retry your request, the server will know to
3324
+ # ignore the request if it has already been completed. The server will
3325
+ # guarantee that for at least 60 minutes since the first request.
3326
+ #
3327
+ # For example, consider a situation where you make an initial request and
3328
+ # the request times out. If you make the request again with the same request
3329
+ # ID, the server can check if original operation with the same request ID
3330
+ # was received, and if so, will ignore the second request. This prevents
3331
+ # clients from accidentally creating duplicate commitments.
3332
+ #
3333
+ # The request ID must be a valid UUID with the exception that zero UUID is
3334
+ # not supported (00000000-0000-0000-0000-000000000000).
3335
+ # @param validate_only [::Boolean]
3336
+ # Optional. If set, the backend validates the request, but doesn't actually
3337
+ # execute it.
3338
+ #
3339
+ # @yield [response, operation] Access the result along with the RPC operation
3340
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1beta::User]
3341
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3342
+ #
3343
+ # @return [::Google::Cloud::AlloyDB::V1beta::User]
3344
+ #
3345
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3346
+ #
3347
+ # @example Basic example
3348
+ # require "google/cloud/alloy_db/v1beta"
3349
+ #
3350
+ # # Create a client object. The client can be reused for multiple calls.
3351
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
3352
+ #
3353
+ # # Create a request. To set request fields, pass in keyword arguments.
3354
+ # request = Google::Cloud::AlloyDB::V1beta::CreateUserRequest.new
3355
+ #
3356
+ # # Call the create_user method.
3357
+ # result = client.create_user request
3358
+ #
3359
+ # # The returned object is of type Google::Cloud::AlloyDB::V1beta::User.
3360
+ # p result
3361
+ #
3362
+ def create_user request, options = nil
3363
+ raise ::ArgumentError, "request must be provided" if request.nil?
3364
+
3365
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::CreateUserRequest
3366
+
3367
+ # Converts hash and nil to an options object
3368
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3369
+
3370
+ # Customize the options with defaults
3371
+ metadata = @config.rpcs.create_user.metadata.to_h
3372
+
3373
+ # Set x-goog-api-client and x-goog-user-project headers
3374
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3375
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3376
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
3377
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3378
+
3379
+ header_params = {}
3380
+ if request.parent
3381
+ header_params["parent"] = request.parent
3382
+ end
3383
+
3384
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3385
+ metadata[:"x-goog-request-params"] ||= request_params_header
3386
+
3387
+ options.apply_defaults timeout: @config.rpcs.create_user.timeout,
3388
+ metadata: metadata,
3389
+ retry_policy: @config.rpcs.create_user.retry_policy
3390
+
3391
+ options.apply_defaults timeout: @config.timeout,
3392
+ metadata: @config.metadata,
3393
+ retry_policy: @config.retry_policy
3394
+
3395
+ @alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
3396
+ yield response, operation if block_given?
3397
+ return response
3398
+ end
3399
+ rescue ::GRPC::BadStatus => e
3400
+ raise ::Google::Cloud::Error.from_error(e)
3401
+ end
3402
+
3403
+ ##
3404
+ # Updates the parameters of a single User.
3405
+ #
3406
+ # @overload update_user(request, options = nil)
3407
+ # Pass arguments to `update_user` via a request object, either of type
3408
+ # {::Google::Cloud::AlloyDB::V1beta::UpdateUserRequest} or an equivalent Hash.
3409
+ #
3410
+ # @param request [::Google::Cloud::AlloyDB::V1beta::UpdateUserRequest, ::Hash]
3411
+ # A request object representing the call parameters. Required. To specify no
3412
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3413
+ # @param options [::Gapic::CallOptions, ::Hash]
3414
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3415
+ #
3416
+ # @overload update_user(update_mask: nil, user: nil, request_id: nil, validate_only: nil, allow_missing: nil)
3417
+ # Pass arguments to `update_user` via keyword arguments. Note that at
3418
+ # least one keyword argument is required. To specify no parameters, or to keep all
3419
+ # the default parameter values, pass an empty Hash as a request object (see above).
3420
+ #
3421
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3422
+ # Optional. Field mask is used to specify the fields to be overwritten in the
3423
+ # User resource by the update.
3424
+ # The fields specified in the update_mask are relative to the resource, not
3425
+ # the full request. A field will be overwritten if it is in the mask. If the
3426
+ # user does not provide a mask then all fields will be overwritten.
3427
+ # @param user [::Google::Cloud::AlloyDB::V1beta::User, ::Hash]
3428
+ # Required. The resource being updated
3429
+ # @param request_id [::String]
3430
+ # Optional. An optional request ID to identify requests. Specify a unique
3431
+ # request ID so that if you must retry your request, the server will know to
3432
+ # ignore the request if it has already been completed. The server will
3433
+ # guarantee that for at least 60 minutes since the first request.
3434
+ #
3435
+ # For example, consider a situation where you make an initial request and
3436
+ # the request times out. If you make the request again with the same request
3437
+ # ID, the server can check if original operation with the same request ID
3438
+ # was received, and if so, will ignore the second request. This prevents
3439
+ # clients from accidentally creating duplicate commitments.
3440
+ #
3441
+ # The request ID must be a valid UUID with the exception that zero UUID is
3442
+ # not supported (00000000-0000-0000-0000-000000000000).
3443
+ # @param validate_only [::Boolean]
3444
+ # Optional. If set, the backend validates the request, but doesn't actually
3445
+ # execute it.
3446
+ # @param allow_missing [::Boolean]
3447
+ # Optional. Allow missing fields in the update mask.
3448
+ #
3449
+ # @yield [response, operation] Access the result along with the RPC operation
3450
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1beta::User]
3451
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3452
+ #
3453
+ # @return [::Google::Cloud::AlloyDB::V1beta::User]
3454
+ #
3455
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3456
+ #
3457
+ # @example Basic example
3458
+ # require "google/cloud/alloy_db/v1beta"
3459
+ #
3460
+ # # Create a client object. The client can be reused for multiple calls.
3461
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
3462
+ #
3463
+ # # Create a request. To set request fields, pass in keyword arguments.
3464
+ # request = Google::Cloud::AlloyDB::V1beta::UpdateUserRequest.new
3465
+ #
3466
+ # # Call the update_user method.
3467
+ # result = client.update_user request
3468
+ #
3469
+ # # The returned object is of type Google::Cloud::AlloyDB::V1beta::User.
3470
+ # p result
3471
+ #
3472
+ def update_user request, options = nil
3473
+ raise ::ArgumentError, "request must be provided" if request.nil?
3474
+
3475
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::UpdateUserRequest
3476
+
3477
+ # Converts hash and nil to an options object
3478
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3479
+
3480
+ # Customize the options with defaults
3481
+ metadata = @config.rpcs.update_user.metadata.to_h
3482
+
3483
+ # Set x-goog-api-client and x-goog-user-project headers
3484
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3485
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3486
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
3487
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3488
+
3489
+ header_params = {}
3490
+ if request.user&.name
3491
+ header_params["user.name"] = request.user.name
3492
+ end
3493
+
3494
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3495
+ metadata[:"x-goog-request-params"] ||= request_params_header
3496
+
3497
+ options.apply_defaults timeout: @config.rpcs.update_user.timeout,
3498
+ metadata: metadata,
3499
+ retry_policy: @config.rpcs.update_user.retry_policy
3500
+
3501
+ options.apply_defaults timeout: @config.timeout,
3502
+ metadata: @config.metadata,
3503
+ retry_policy: @config.retry_policy
3504
+
3505
+ @alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
3506
+ yield response, operation if block_given?
3507
+ return response
3508
+ end
3509
+ rescue ::GRPC::BadStatus => e
3510
+ raise ::Google::Cloud::Error.from_error(e)
3511
+ end
3512
+
3513
+ ##
3514
+ # Deletes a single User.
3515
+ #
3516
+ # @overload delete_user(request, options = nil)
3517
+ # Pass arguments to `delete_user` via a request object, either of type
3518
+ # {::Google::Cloud::AlloyDB::V1beta::DeleteUserRequest} or an equivalent Hash.
3519
+ #
3520
+ # @param request [::Google::Cloud::AlloyDB::V1beta::DeleteUserRequest, ::Hash]
3521
+ # A request object representing the call parameters. Required. To specify no
3522
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3523
+ # @param options [::Gapic::CallOptions, ::Hash]
3524
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3525
+ #
3526
+ # @overload delete_user(name: nil, request_id: nil, validate_only: nil)
3527
+ # Pass arguments to `delete_user` via keyword arguments. Note that at
3528
+ # least one keyword argument is required. To specify no parameters, or to keep all
3529
+ # the default parameter values, pass an empty Hash as a request object (see above).
3530
+ #
3531
+ # @param name [::String]
3532
+ # Required. The name of the resource. For the required format, see the
3533
+ # comment on the User.name field.
3534
+ # @param request_id [::String]
3535
+ # Optional. An optional request ID to identify requests. Specify a unique
3536
+ # request ID so that if you must retry your request, the server will know to
3537
+ # ignore the request if it has already been completed. The server will
3538
+ # guarantee that for at least 60 minutes after the first request.
3539
+ #
3540
+ # For example, consider a situation where you make an initial request and
3541
+ # the request times out. If you make the request again with the same request
3542
+ # ID, the server can check if original operation with the same request ID
3543
+ # was received, and if so, will ignore the second request. This prevents
3544
+ # clients from accidentally creating duplicate commitments.
3545
+ #
3546
+ # The request ID must be a valid UUID with the exception that zero UUID is
3547
+ # not supported (00000000-0000-0000-0000-000000000000).
3548
+ # @param validate_only [::Boolean]
3549
+ # Optional. If set, the backend validates the request, but doesn't actually
3550
+ # execute it.
3551
+ #
3552
+ # @yield [response, operation] Access the result along with the RPC operation
3553
+ # @yieldparam response [::Google::Protobuf::Empty]
3554
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3555
+ #
3556
+ # @return [::Google::Protobuf::Empty]
3557
+ #
3558
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3559
+ #
3560
+ # @example Basic example
3561
+ # require "google/cloud/alloy_db/v1beta"
3562
+ #
3563
+ # # Create a client object. The client can be reused for multiple calls.
3564
+ # client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
3565
+ #
3566
+ # # Create a request. To set request fields, pass in keyword arguments.
3567
+ # request = Google::Cloud::AlloyDB::V1beta::DeleteUserRequest.new
3568
+ #
3569
+ # # Call the delete_user method.
3570
+ # result = client.delete_user request
3571
+ #
3572
+ # # The returned object is of type Google::Protobuf::Empty.
3573
+ # p result
3574
+ #
3575
+ def delete_user request, options = nil
3576
+ raise ::ArgumentError, "request must be provided" if request.nil?
3577
+
3578
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::DeleteUserRequest
3579
+
3580
+ # Converts hash and nil to an options object
3581
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3582
+
3583
+ # Customize the options with defaults
3584
+ metadata = @config.rpcs.delete_user.metadata.to_h
3585
+
3586
+ # Set x-goog-api-client and x-goog-user-project headers
3587
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3588
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3589
+ gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
3590
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3591
+
3592
+ header_params = {}
3593
+ if request.name
3594
+ header_params["name"] = request.name
3595
+ end
3596
+
3597
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3598
+ metadata[:"x-goog-request-params"] ||= request_params_header
3599
+
3600
+ options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
3601
+ metadata: metadata,
3602
+ retry_policy: @config.rpcs.delete_user.retry_policy
3603
+
3604
+ options.apply_defaults timeout: @config.timeout,
3605
+ metadata: @config.metadata,
3606
+ retry_policy: @config.retry_policy
3607
+
3608
+ @alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
3609
+ yield response, operation if block_given?
3610
+ return response
3611
+ end
3612
+ rescue ::GRPC::BadStatus => e
3613
+ raise ::Google::Cloud::Error.from_error(e)
3614
+ end
3615
+
3616
+ ##
3617
+ # Configuration class for the AlloyDBAdmin API.
3618
+ #
3619
+ # This class represents the configuration for AlloyDBAdmin,
3620
+ # providing control over timeouts, retry behavior, logging, transport
3621
+ # parameters, and other low-level controls. Certain parameters can also be
3622
+ # applied individually to specific RPCs. See
3623
+ # {::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client::Configuration::Rpcs}
3624
+ # for a list of RPCs that can be configured independently.
3625
+ #
3626
+ # Configuration can be applied globally to all clients, or to a single client
3627
+ # on construction.
3628
+ #
3629
+ # @example
3630
+ #
3631
+ # # Modify the global config, setting the timeout for
3632
+ # # list_clusters to 20 seconds,
3633
+ # # and all remaining timeouts to 10 seconds.
3634
+ # ::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.configure do |config|
3635
+ # config.timeout = 10.0
3636
+ # config.rpcs.list_clusters.timeout = 20.0
3637
+ # end
3638
+ #
3639
+ # # Apply the above configuration only to a new client.
3640
+ # client = ::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new do |config|
3641
+ # config.timeout = 10.0
3642
+ # config.rpcs.list_clusters.timeout = 20.0
3643
+ # end
3644
+ #
3645
+ # @!attribute [rw] endpoint
3646
+ # The hostname or hostname:port of the service endpoint.
3647
+ # Defaults to `"alloydb.googleapis.com"`.
3648
+ # @return [::String]
3649
+ # @!attribute [rw] credentials
3650
+ # Credentials to send with calls. You may provide any of the following types:
3651
+ # * (`String`) The path to a service account key file in JSON format
3652
+ # * (`Hash`) A service account key as a Hash
3653
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3654
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3655
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3656
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3657
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3658
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3659
+ # * (`nil`) indicating no credentials
3660
+ # @return [::Object]
3661
+ # @!attribute [rw] scope
3662
+ # The OAuth scopes
3663
+ # @return [::Array<::String>]
3664
+ # @!attribute [rw] lib_name
3665
+ # The library name as recorded in instrumentation and logging
3666
+ # @return [::String]
3667
+ # @!attribute [rw] lib_version
3668
+ # The library version as recorded in instrumentation and logging
3669
+ # @return [::String]
3670
+ # @!attribute [rw] channel_args
3671
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
3672
+ # `GRPC::Core::Channel` object is provided as the credential.
3673
+ # @return [::Hash]
3674
+ # @!attribute [rw] interceptors
3675
+ # An array of interceptors that are run before calls are executed.
3676
+ # @return [::Array<::GRPC::ClientInterceptor>]
3677
+ # @!attribute [rw] timeout
3678
+ # The call timeout in seconds.
3679
+ # @return [::Numeric]
3680
+ # @!attribute [rw] metadata
3681
+ # Additional gRPC headers to be sent with the call.
3682
+ # @return [::Hash{::Symbol=>::String}]
3683
+ # @!attribute [rw] retry_policy
3684
+ # The retry policy. The value is a hash with the following keys:
3685
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3686
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3687
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3688
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3689
+ # trigger a retry.
3690
+ # @return [::Hash]
3691
+ # @!attribute [rw] quota_project
3692
+ # A separate project against which to charge quota.
3693
+ # @return [::String]
3694
+ #
3695
+ class Configuration
3696
+ extend ::Gapic::Config
3697
+
3698
+ DEFAULT_ENDPOINT = "alloydb.googleapis.com"
3699
+
3700
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3701
+ config_attr :credentials, nil do |value|
3702
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3703
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
3704
+ allowed.any? { |klass| klass === value }
3705
+ end
3706
+ config_attr :scope, nil, ::String, ::Array, nil
3707
+ config_attr :lib_name, nil, ::String, nil
3708
+ config_attr :lib_version, nil, ::String, nil
3709
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
3710
+ config_attr :interceptors, nil, ::Array, nil
3711
+ config_attr :timeout, nil, ::Numeric, nil
3712
+ config_attr :metadata, nil, ::Hash, nil
3713
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3714
+ config_attr :quota_project, nil, ::String, nil
3715
+
3716
+ # @private
3717
+ def initialize parent_config = nil
3718
+ @parent_config = parent_config unless parent_config.nil?
3719
+
3720
+ yield self if block_given?
3721
+ end
3722
+
3723
+ ##
3724
+ # Configurations for individual RPCs
3725
+ # @return [Rpcs]
3726
+ #
3727
+ def rpcs
3728
+ @rpcs ||= begin
3729
+ parent_rpcs = nil
3730
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3731
+ Rpcs.new parent_rpcs
3732
+ end
3733
+ end
3734
+
3735
+ ##
3736
+ # Configuration for the channel pool
3737
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
3738
+ #
3739
+ def channel_pool
3740
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
3741
+ end
3742
+
3743
+ ##
3744
+ # Configuration RPC class for the AlloyDBAdmin API.
3745
+ #
3746
+ # Includes fields providing the configuration for each RPC in this service.
3104
3747
  # Each configuration object is of type `Gapic::Config::Method` and includes
3105
3748
  # the following configuration fields:
3106
3749
  #
@@ -3196,6 +3839,11 @@ module Google
3196
3839
  #
3197
3840
  attr_reader :failover_instance
3198
3841
  ##
3842
+ # RPC-specific configuration for `inject_fault`
3843
+ # @return [::Gapic::Config::Method]
3844
+ #
3845
+ attr_reader :inject_fault
3846
+ ##
3199
3847
  # RPC-specific configuration for `restart_instance`
3200
3848
  # @return [::Gapic::Config::Method]
3201
3849
  #
@@ -3240,6 +3888,31 @@ module Google
3240
3888
  # @return [::Gapic::Config::Method]
3241
3889
  #
3242
3890
  attr_reader :get_connection_info
3891
+ ##
3892
+ # RPC-specific configuration for `list_users`
3893
+ # @return [::Gapic::Config::Method]
3894
+ #
3895
+ attr_reader :list_users
3896
+ ##
3897
+ # RPC-specific configuration for `get_user`
3898
+ # @return [::Gapic::Config::Method]
3899
+ #
3900
+ attr_reader :get_user
3901
+ ##
3902
+ # RPC-specific configuration for `create_user`
3903
+ # @return [::Gapic::Config::Method]
3904
+ #
3905
+ attr_reader :create_user
3906
+ ##
3907
+ # RPC-specific configuration for `update_user`
3908
+ # @return [::Gapic::Config::Method]
3909
+ #
3910
+ attr_reader :update_user
3911
+ ##
3912
+ # RPC-specific configuration for `delete_user`
3913
+ # @return [::Gapic::Config::Method]
3914
+ #
3915
+ attr_reader :delete_user
3243
3916
 
3244
3917
  # @private
3245
3918
  def initialize parent_rpcs = nil
@@ -3275,6 +3948,8 @@ module Google
3275
3948
  @delete_instance = ::Gapic::Config::Method.new delete_instance_config
3276
3949
  failover_instance_config = parent_rpcs.failover_instance if parent_rpcs.respond_to? :failover_instance
3277
3950
  @failover_instance = ::Gapic::Config::Method.new failover_instance_config
3951
+ inject_fault_config = parent_rpcs.inject_fault if parent_rpcs.respond_to? :inject_fault
3952
+ @inject_fault = ::Gapic::Config::Method.new inject_fault_config
3278
3953
  restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
3279
3954
  @restart_instance = ::Gapic::Config::Method.new restart_instance_config
3280
3955
  list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
@@ -3293,6 +3968,16 @@ module Google
3293
3968
  @generate_client_certificate = ::Gapic::Config::Method.new generate_client_certificate_config
3294
3969
  get_connection_info_config = parent_rpcs.get_connection_info if parent_rpcs.respond_to? :get_connection_info
3295
3970
  @get_connection_info = ::Gapic::Config::Method.new get_connection_info_config
3971
+ list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
3972
+ @list_users = ::Gapic::Config::Method.new list_users_config
3973
+ get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
3974
+ @get_user = ::Gapic::Config::Method.new get_user_config
3975
+ create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
3976
+ @create_user = ::Gapic::Config::Method.new create_user_config
3977
+ update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
3978
+ @update_user = ::Gapic::Config::Method.new update_user_config
3979
+ delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
3980
+ @delete_user = ::Gapic::Config::Method.new delete_user_config
3296
3981
 
3297
3982
  yield self if block_given?
3298
3983
  end