google-cloud-redis-v1 0.1.0 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b63e323f187095977bdfa9a03fd5db8b0d0342e51393e121270f0df28c74629
4
- data.tar.gz: 4970fd7471dc313ca0709f302f97d02ac88897abb977600fa9e93a7327d301af
3
+ metadata.gz: da893ffe6821ed195b1e8de7cc9a53f9f6f45b6ce3322e82563a29f61271b868
4
+ data.tar.gz: dc3790b7367b19109e0eae6f5c9ab7361813f20616664cffd558bc6f06ca1d54
5
5
  SHA512:
6
- metadata.gz: 9769939290b339c6c5479e6f59e52efa275744e79ceda3f0e4658102f830c4bc73237c6e6b9c2234328e4c4bb09f6630099c1317a55609b920e117f1d77d52dc
7
- data.tar.gz: 5259af8ffd676b03c7a81d7b356c8cedc42900a79080a01bb8ce315c57a5657ea182d7635f07c06a3ff264ba05e852a8f5afb18ae67bbed1c0d6eda937605dcb
6
+ metadata.gz: 0035b671f653d38b1523943ce4a74d217ef27ce7aef0ca6e0c63620b97e4f2cf6bb781996db5fbcba5ee40b73c1a504cc76ed06c82bfe24872fc8bcd748f8de8
7
+ data.tar.gz: ce93139419b23e2e13c9438dd86ffbf4f317550ddaf63fe59237a6c6b7ab06f15ce315353653f4a083077853c8c2680695c621e7c652866e1dedc8e5ec16128d
@@ -27,7 +27,7 @@ export REDIS_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/redis/v1"
29
29
 
30
- client = Google::Cloud::Redis::V1::CloudRedis::Client.new
30
+ client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-redis-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::Redis::V1::CloudRedis::Credentials}):
67
+ {::Google::Cloud::Redis::V1::CloudRedis::Credentials}):
68
68
 
69
69
  1. `REDIS_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `REDIS_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/redis/v1"
77
77
 
78
78
  ENV["REDIS_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::Redis::V1::CloudRedis::Client.new
80
+ client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/redis/v1"
90
90
 
91
- client = Google::Cloud::Redis::V1::CloudRedis::Client.new do |config|
91
+ client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -98,11 +98,11 @@ Or configured globally for all clients:
98
98
  ```ruby
99
99
  require "google/cloud/redis/v1"
100
100
 
101
- Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
101
+ ::Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::Redis::V1::CloudRedis::Client.new
105
+ client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/redis.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -25,7 +26,7 @@ In order to use this library, you first need to go through the following steps:
25
26
  ```ruby
26
27
  require "google/cloud/redis/v1"
27
28
 
28
- client = Google::Cloud::Redis::V1::CloudRedis::Client.new
29
+ client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
29
30
  request = my_create_request
30
31
  response = client.list_instances request
31
32
  ```
@@ -33,6 +34,9 @@ response = client.list_instances request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-redis-v1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/memorystore/docs/redis)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -26,7 +26,7 @@ module Google
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
28
  # require "google/cloud/redis/v1"
29
- # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
29
+ # client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
30
30
  #
31
31
  module V1
32
32
  end
@@ -51,7 +51,7 @@ module Google
51
51
  # To load this service and instantiate a client:
52
52
  #
53
53
  # require "google/cloud/redis/v1/cloud_redis"
54
- # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
54
+ # client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
55
55
  #
56
56
  module CloudRedis
57
57
  end
@@ -52,15 +52,15 @@ module Google
52
52
  ##
53
53
  # Configure the CloudRedis Client class.
54
54
  #
55
- # See {Google::Cloud::Redis::V1::CloudRedis::Client::Configuration}
55
+ # See {::Google::Cloud::Redis::V1::CloudRedis::Client::Configuration}
56
56
  # for a description of the configuration fields.
57
57
  #
58
58
  # ## Example
59
59
  #
60
60
  # To modify the configuration for all CloudRedis clients:
61
61
  #
62
- # Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
63
- # config.timeout = 10_000
62
+ # ::Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
63
+ # config.timeout = 10.0
64
64
  # end
65
65
  #
66
66
  # @yield [config] Configure the Client client.
@@ -108,7 +108,7 @@ module Google
108
108
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
109
109
  # should be made on {Client.configure}.
110
110
  #
111
- # See {Google::Cloud::Redis::V1::CloudRedis::Client::Configuration}
111
+ # See {::Google::Cloud::Redis::V1::CloudRedis::Client::Configuration}
112
112
  # for a description of the configuration fields.
113
113
  #
114
114
  # @yield [config] Configure the Client client.
@@ -129,13 +129,13 @@ module Google
129
129
  # To create a new CloudRedis client with the default
130
130
  # configuration:
131
131
  #
132
- # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
132
+ # client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
133
133
  #
134
134
  # To create a new CloudRedis client with a custom
135
135
  # configuration:
136
136
  #
137
- # client = Google::Cloud::Redis::V1::CloudRedis::Client.new do |config|
138
- # config.timeout = 10_000
137
+ # client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new do |config|
138
+ # config.timeout = 10.0
139
139
  # end
140
140
  #
141
141
  # @yield [config] Configure the CloudRedis client.
@@ -160,15 +160,16 @@ module Google
160
160
  if credentials.is_a?(String) || credentials.is_a?(Hash)
161
161
  credentials = Credentials.new credentials, scope: @config.scope
162
162
  end
163
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
163
+ @quota_project_id = @config.quota_project
164
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
164
165
 
165
166
  @operations_client = Operations.new do |config|
166
167
  config.credentials = credentials
167
168
  config.endpoint = @config.endpoint
168
169
  end
169
170
 
170
- @cloud_redis_stub = Gapic::ServiceStub.new(
171
- Google::Cloud::Redis::V1::CloudRedis::Stub,
171
+ @cloud_redis_stub = ::Gapic::ServiceStub.new(
172
+ ::Google::Cloud::Redis::V1::CloudRedis::Stub,
172
173
  credentials: credentials,
173
174
  endpoint: @config.endpoint,
174
175
  channel_args: @config.channel_args,
@@ -179,7 +180,7 @@ module Google
179
180
  ##
180
181
  # Get the associated client for long-running operations.
181
182
  #
182
- # @return [Google::Cloud::Redis::V1::CloudRedis::Operations]
183
+ # @return [::Google::Cloud::Redis::V1::CloudRedis::Operations]
183
184
  #
184
185
  attr_reader :operations_client
185
186
 
@@ -198,12 +199,12 @@ module Google
198
199
  #
199
200
  # @overload list_instances(request, options = nil)
200
201
  # Pass arguments to `list_instances` via a request object, either of type
201
- # {Google::Cloud::Redis::V1::ListInstancesRequest} or an equivalent Hash.
202
+ # {::Google::Cloud::Redis::V1::ListInstancesRequest} or an equivalent Hash.
202
203
  #
203
- # @param request [Google::Cloud::Redis::V1::ListInstancesRequest, Hash]
204
+ # @param request [::Google::Cloud::Redis::V1::ListInstancesRequest, ::Hash]
204
205
  # A request object representing the call parameters. Required. To specify no
205
206
  # parameters, or to keep all the default parameter values, pass an empty Hash.
206
- # @param options [Gapic::CallOptions, Hash]
207
+ # @param options [::Gapic::CallOptions, ::Hash]
207
208
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
208
209
  #
209
210
  # @overload list_instances(parent: nil, page_size: nil, page_token: nil)
@@ -211,43 +212,43 @@ module Google
211
212
  # least one keyword argument is required. To specify no parameters, or to keep all
212
213
  # the default parameter values, pass an empty Hash as a request object (see above).
213
214
  #
214
- # @param parent [String]
215
+ # @param parent [::String]
215
216
  # Required. The resource name of the instance location using the form:
216
217
  # `projects/{project_id}/locations/{location_id}`
217
218
  # where `location_id` refers to a GCP region.
218
- # @param page_size [Integer]
219
+ # @param page_size [::Integer]
219
220
  # The maximum number of items to return.
220
221
  #
221
222
  # If not specified, a default value of 1000 will be used by the service.
222
223
  # Regardless of the page_size value, the response may include a partial list
223
224
  # and a caller should only rely on response's
224
- # {Google::Cloud::Redis::V1::ListInstancesResponse#next_page_token `next_page_token`}
225
+ # {::Google::Cloud::Redis::V1::ListInstancesResponse#next_page_token `next_page_token`}
225
226
  # to determine if there are more instances left to be queried.
226
- # @param page_token [String]
227
+ # @param page_token [::String]
227
228
  # The `next_page_token` value returned from a previous
228
- # {Google::Cloud::Redis::V1::CloudRedis::Client#list_instances ListInstances} request, if any.
229
+ # {::Google::Cloud::Redis::V1::CloudRedis::Client#list_instances ListInstances} request, if any.
229
230
  #
230
231
  # @yield [response, operation] Access the result along with the RPC operation
231
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Redis::V1::Instance>]
232
- # @yieldparam operation [GRPC::ActiveCall::Operation]
232
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::V1::Instance>]
233
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
233
234
  #
234
- # @return [Gapic::PagedEnumerable<Google::Cloud::Redis::V1::Instance>]
235
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::V1::Instance>]
235
236
  #
236
- # @raise [Google::Cloud::Error] if the RPC is aborted.
237
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
237
238
  #
238
239
  def list_instances request, options = nil
239
- raise ArgumentError, "request must be provided" if request.nil?
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
240
241
 
241
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::ListInstancesRequest
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::ListInstancesRequest
242
243
 
243
244
  # Converts hash and nil to an options object
244
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
245
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
245
246
 
246
247
  # Customize the options with defaults
247
248
  metadata = @config.rpcs.list_instances.metadata.to_h
248
249
 
249
250
  # Set x-goog-api-client and x-goog-user-project headers
250
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
251
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
251
252
  lib_name: @config.lib_name, lib_version: @config.lib_version,
252
253
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
253
254
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -265,12 +266,12 @@ module Google
265
266
  retry_policy: @config.retry_policy
266
267
 
267
268
  @cloud_redis_stub.call_rpc :list_instances, request, options: options do |response, operation|
268
- response = Gapic::PagedEnumerable.new @cloud_redis_stub, :list_instances, request, response, operation, options
269
+ response = ::Gapic::PagedEnumerable.new @cloud_redis_stub, :list_instances, request, response, operation, options
269
270
  yield response, operation if block_given?
270
271
  return response
271
272
  end
272
- rescue GRPC::BadStatus => e
273
- raise Google::Cloud::Error.from_error(e)
273
+ rescue ::GRPC::BadStatus => e
274
+ raise ::Google::Cloud::Error.from_error(e)
274
275
  end
275
276
 
276
277
  ##
@@ -278,12 +279,12 @@ module Google
278
279
  #
279
280
  # @overload get_instance(request, options = nil)
280
281
  # Pass arguments to `get_instance` via a request object, either of type
281
- # {Google::Cloud::Redis::V1::GetInstanceRequest} or an equivalent Hash.
282
+ # {::Google::Cloud::Redis::V1::GetInstanceRequest} or an equivalent Hash.
282
283
  #
283
- # @param request [Google::Cloud::Redis::V1::GetInstanceRequest, Hash]
284
+ # @param request [::Google::Cloud::Redis::V1::GetInstanceRequest, ::Hash]
284
285
  # A request object representing the call parameters. Required. To specify no
285
286
  # parameters, or to keep all the default parameter values, pass an empty Hash.
286
- # @param options [Gapic::CallOptions, Hash]
287
+ # @param options [::Gapic::CallOptions, ::Hash]
287
288
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
288
289
  #
289
290
  # @overload get_instance(name: nil)
@@ -291,32 +292,32 @@ module Google
291
292
  # least one keyword argument is required. To specify no parameters, or to keep all
292
293
  # the default parameter values, pass an empty Hash as a request object (see above).
293
294
  #
294
- # @param name [String]
295
+ # @param name [::String]
295
296
  # Required. Redis instance resource name using the form:
296
297
  # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
297
298
  # where `location_id` refers to a GCP region.
298
299
  #
299
300
  # @yield [response, operation] Access the result along with the RPC operation
300
- # @yieldparam response [Google::Cloud::Redis::V1::Instance]
301
- # @yieldparam operation [GRPC::ActiveCall::Operation]
301
+ # @yieldparam response [::Google::Cloud::Redis::V1::Instance]
302
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
302
303
  #
303
- # @return [Google::Cloud::Redis::V1::Instance]
304
+ # @return [::Google::Cloud::Redis::V1::Instance]
304
305
  #
305
- # @raise [Google::Cloud::Error] if the RPC is aborted.
306
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
306
307
  #
307
308
  def get_instance request, options = nil
308
- raise ArgumentError, "request must be provided" if request.nil?
309
+ raise ::ArgumentError, "request must be provided" if request.nil?
309
310
 
310
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::GetInstanceRequest
311
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::GetInstanceRequest
311
312
 
312
313
  # Converts hash and nil to an options object
313
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
314
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
314
315
 
315
316
  # Customize the options with defaults
316
317
  metadata = @config.rpcs.get_instance.metadata.to_h
317
318
 
318
319
  # Set x-goog-api-client and x-goog-user-project headers
319
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
320
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
320
321
  lib_name: @config.lib_name, lib_version: @config.lib_version,
321
322
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
322
323
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -337,15 +338,15 @@ module Google
337
338
  yield response, operation if block_given?
338
339
  return response
339
340
  end
340
- rescue GRPC::BadStatus => e
341
- raise Google::Cloud::Error.from_error(e)
341
+ rescue ::GRPC::BadStatus => e
342
+ raise ::Google::Cloud::Error.from_error(e)
342
343
  end
343
344
 
344
345
  ##
345
346
  # Creates a Redis instance based on the specified tier and memory size.
346
347
  #
347
348
  # By default, the instance is accessible from the project's
348
- # [default network](/compute/docs/networks-and-firewalls#networks).
349
+ # [default network](https://cloud.google.com/vpc/docs/vpc).
349
350
  #
350
351
  # The creation is executed asynchronously and callers may check the returned
351
352
  # operation to track its progress. Once the operation is completed the Redis
@@ -357,12 +358,12 @@ module Google
357
358
  #
358
359
  # @overload create_instance(request, options = nil)
359
360
  # Pass arguments to `create_instance` via a request object, either of type
360
- # {Google::Cloud::Redis::V1::CreateInstanceRequest} or an equivalent Hash.
361
+ # {::Google::Cloud::Redis::V1::CreateInstanceRequest} or an equivalent Hash.
361
362
  #
362
- # @param request [Google::Cloud::Redis::V1::CreateInstanceRequest, Hash]
363
+ # @param request [::Google::Cloud::Redis::V1::CreateInstanceRequest, ::Hash]
363
364
  # A request object representing the call parameters. Required. To specify no
364
365
  # parameters, or to keep all the default parameter values, pass an empty Hash.
365
- # @param options [Gapic::CallOptions, Hash]
366
+ # @param options [::Gapic::CallOptions, ::Hash]
366
367
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
367
368
  #
368
369
  # @overload create_instance(parent: nil, instance_id: nil, instance: nil)
@@ -370,11 +371,11 @@ module Google
370
371
  # least one keyword argument is required. To specify no parameters, or to keep all
371
372
  # the default parameter values, pass an empty Hash as a request object (see above).
372
373
  #
373
- # @param parent [String]
374
+ # @param parent [::String]
374
375
  # Required. The resource name of the instance location using the form:
375
376
  # `projects/{project_id}/locations/{location_id}`
376
377
  # where `location_id` refers to a GCP region.
377
- # @param instance_id [String]
378
+ # @param instance_id [::String]
378
379
  # Required. The logical name of the Redis instance in the customer project
379
380
  # with the following restrictions:
380
381
  #
@@ -383,30 +384,30 @@ module Google
383
384
  # * Must be between 1-40 characters.
384
385
  # * Must end with a number or a letter.
385
386
  # * Must be unique within the customer project / location
386
- # @param instance [Google::Cloud::Redis::V1::Instance, Hash]
387
+ # @param instance [::Google::Cloud::Redis::V1::Instance, ::Hash]
387
388
  # Required. A Redis [Instance] resource
388
389
  #
389
390
  # @yield [response, operation] Access the result along with the RPC operation
390
- # @yieldparam response [Gapic::Operation]
391
- # @yieldparam operation [GRPC::ActiveCall::Operation]
391
+ # @yieldparam response [::Gapic::Operation]
392
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
392
393
  #
393
- # @return [Gapic::Operation]
394
+ # @return [::Gapic::Operation]
394
395
  #
395
- # @raise [Google::Cloud::Error] if the RPC is aborted.
396
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
396
397
  #
397
398
  def create_instance request, options = nil
398
- raise ArgumentError, "request must be provided" if request.nil?
399
+ raise ::ArgumentError, "request must be provided" if request.nil?
399
400
 
400
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::CreateInstanceRequest
401
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::CreateInstanceRequest
401
402
 
402
403
  # Converts hash and nil to an options object
403
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
404
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
404
405
 
405
406
  # Customize the options with defaults
406
407
  metadata = @config.rpcs.create_instance.metadata.to_h
407
408
 
408
409
  # Set x-goog-api-client and x-goog-user-project headers
409
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
410
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
410
411
  lib_name: @config.lib_name, lib_version: @config.lib_version,
411
412
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
412
413
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -424,12 +425,12 @@ module Google
424
425
  retry_policy: @config.retry_policy
425
426
 
426
427
  @cloud_redis_stub.call_rpc :create_instance, request, options: options do |response, operation|
427
- response = Gapic::Operation.new response, @operations_client, options: options
428
+ response = ::Gapic::Operation.new response, @operations_client, options: options
428
429
  yield response, operation if block_given?
429
430
  return response
430
431
  end
431
- rescue GRPC::BadStatus => e
432
- raise Google::Cloud::Error.from_error(e)
432
+ rescue ::GRPC::BadStatus => e
433
+ raise ::Google::Cloud::Error.from_error(e)
433
434
  end
434
435
 
435
436
  ##
@@ -441,12 +442,12 @@ module Google
441
442
  #
442
443
  # @overload update_instance(request, options = nil)
443
444
  # Pass arguments to `update_instance` via a request object, either of type
444
- # {Google::Cloud::Redis::V1::UpdateInstanceRequest} or an equivalent Hash.
445
+ # {::Google::Cloud::Redis::V1::UpdateInstanceRequest} or an equivalent Hash.
445
446
  #
446
- # @param request [Google::Cloud::Redis::V1::UpdateInstanceRequest, Hash]
447
+ # @param request [::Google::Cloud::Redis::V1::UpdateInstanceRequest, ::Hash]
447
448
  # A request object representing the call parameters. Required. To specify no
448
449
  # parameters, or to keep all the default parameter values, pass an empty Hash.
449
- # @param options [Gapic::CallOptions, Hash]
450
+ # @param options [::Gapic::CallOptions, ::Hash]
450
451
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
451
452
  #
452
453
  # @overload update_instance(update_mask: nil, instance: nil)
@@ -454,40 +455,40 @@ module Google
454
455
  # least one keyword argument is required. To specify no parameters, or to keep all
455
456
  # the default parameter values, pass an empty Hash as a request object (see above).
456
457
  #
457
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
458
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
458
459
  # Required. Mask of fields to update. At least one path must be supplied in
459
460
  # this field. The elements of the repeated paths field may only include these
460
- # fields from {Google::Cloud::Redis::V1::Instance Instance}:
461
+ # fields from {::Google::Cloud::Redis::V1::Instance Instance}:
461
462
  #
462
463
  # * `displayName`
463
464
  # * `labels`
464
465
  # * `memorySizeGb`
465
466
  # * `redisConfig`
466
- # @param instance [Google::Cloud::Redis::V1::Instance, Hash]
467
+ # @param instance [::Google::Cloud::Redis::V1::Instance, ::Hash]
467
468
  # Required. Update description.
468
469
  # Only fields specified in update_mask are updated.
469
470
  #
470
471
  # @yield [response, operation] Access the result along with the RPC operation
471
- # @yieldparam response [Gapic::Operation]
472
- # @yieldparam operation [GRPC::ActiveCall::Operation]
472
+ # @yieldparam response [::Gapic::Operation]
473
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
473
474
  #
474
- # @return [Gapic::Operation]
475
+ # @return [::Gapic::Operation]
475
476
  #
476
- # @raise [Google::Cloud::Error] if the RPC is aborted.
477
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
477
478
  #
478
479
  def update_instance request, options = nil
479
- raise ArgumentError, "request must be provided" if request.nil?
480
+ raise ::ArgumentError, "request must be provided" if request.nil?
480
481
 
481
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::UpdateInstanceRequest
482
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::UpdateInstanceRequest
482
483
 
483
484
  # Converts hash and nil to an options object
484
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
485
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
485
486
 
486
487
  # Customize the options with defaults
487
488
  metadata = @config.rpcs.update_instance.metadata.to_h
488
489
 
489
490
  # Set x-goog-api-client and x-goog-user-project headers
490
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
491
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
491
492
  lib_name: @config.lib_name, lib_version: @config.lib_version,
492
493
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
493
494
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -505,12 +506,12 @@ module Google
505
506
  retry_policy: @config.retry_policy
506
507
 
507
508
  @cloud_redis_stub.call_rpc :update_instance, request, options: options do |response, operation|
508
- response = Gapic::Operation.new response, @operations_client, options: options
509
+ response = ::Gapic::Operation.new response, @operations_client, options: options
509
510
  yield response, operation if block_given?
510
511
  return response
511
512
  end
512
- rescue GRPC::BadStatus => e
513
- raise Google::Cloud::Error.from_error(e)
513
+ rescue ::GRPC::BadStatus => e
514
+ raise ::Google::Cloud::Error.from_error(e)
514
515
  end
515
516
 
516
517
  ##
@@ -525,12 +526,12 @@ module Google
525
526
  #
526
527
  # @overload import_instance(request, options = nil)
527
528
  # Pass arguments to `import_instance` via a request object, either of type
528
- # {Google::Cloud::Redis::V1::ImportInstanceRequest} or an equivalent Hash.
529
+ # {::Google::Cloud::Redis::V1::ImportInstanceRequest} or an equivalent Hash.
529
530
  #
530
- # @param request [Google::Cloud::Redis::V1::ImportInstanceRequest, Hash]
531
+ # @param request [::Google::Cloud::Redis::V1::ImportInstanceRequest, ::Hash]
531
532
  # A request object representing the call parameters. Required. To specify no
532
533
  # parameters, or to keep all the default parameter values, pass an empty Hash.
533
- # @param options [Gapic::CallOptions, Hash]
534
+ # @param options [::Gapic::CallOptions, ::Hash]
534
535
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
535
536
  #
536
537
  # @overload import_instance(name: nil, input_config: nil)
@@ -538,34 +539,34 @@ module Google
538
539
  # least one keyword argument is required. To specify no parameters, or to keep all
539
540
  # the default parameter values, pass an empty Hash as a request object (see above).
540
541
  #
541
- # @param name [String]
542
+ # @param name [::String]
542
543
  # Required. Redis instance resource name using the form:
543
544
  # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
544
545
  # where `location_id` refers to a GCP region.
545
- # @param input_config [Google::Cloud::Redis::V1::InputConfig, Hash]
546
+ # @param input_config [::Google::Cloud::Redis::V1::InputConfig, ::Hash]
546
547
  # Required. Specify data to be imported.
547
548
  #
548
549
  # @yield [response, operation] Access the result along with the RPC operation
549
- # @yieldparam response [Gapic::Operation]
550
- # @yieldparam operation [GRPC::ActiveCall::Operation]
550
+ # @yieldparam response [::Gapic::Operation]
551
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
551
552
  #
552
- # @return [Gapic::Operation]
553
+ # @return [::Gapic::Operation]
553
554
  #
554
- # @raise [Google::Cloud::Error] if the RPC is aborted.
555
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
555
556
  #
556
557
  def import_instance request, options = nil
557
- raise ArgumentError, "request must be provided" if request.nil?
558
+ raise ::ArgumentError, "request must be provided" if request.nil?
558
559
 
559
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::ImportInstanceRequest
560
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::ImportInstanceRequest
560
561
 
561
562
  # Converts hash and nil to an options object
562
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
563
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
563
564
 
564
565
  # Customize the options with defaults
565
566
  metadata = @config.rpcs.import_instance.metadata.to_h
566
567
 
567
568
  # Set x-goog-api-client and x-goog-user-project headers
568
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
569
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
569
570
  lib_name: @config.lib_name, lib_version: @config.lib_version,
570
571
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
571
572
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -583,12 +584,12 @@ module Google
583
584
  retry_policy: @config.retry_policy
584
585
 
585
586
  @cloud_redis_stub.call_rpc :import_instance, request, options: options do |response, operation|
586
- response = Gapic::Operation.new response, @operations_client, options: options
587
+ response = ::Gapic::Operation.new response, @operations_client, options: options
587
588
  yield response, operation if block_given?
588
589
  return response
589
590
  end
590
- rescue GRPC::BadStatus => e
591
- raise Google::Cloud::Error.from_error(e)
591
+ rescue ::GRPC::BadStatus => e
592
+ raise ::Google::Cloud::Error.from_error(e)
592
593
  end
593
594
 
594
595
  ##
@@ -601,12 +602,12 @@ module Google
601
602
  #
602
603
  # @overload export_instance(request, options = nil)
603
604
  # Pass arguments to `export_instance` via a request object, either of type
604
- # {Google::Cloud::Redis::V1::ExportInstanceRequest} or an equivalent Hash.
605
+ # {::Google::Cloud::Redis::V1::ExportInstanceRequest} or an equivalent Hash.
605
606
  #
606
- # @param request [Google::Cloud::Redis::V1::ExportInstanceRequest, Hash]
607
+ # @param request [::Google::Cloud::Redis::V1::ExportInstanceRequest, ::Hash]
607
608
  # A request object representing the call parameters. Required. To specify no
608
609
  # parameters, or to keep all the default parameter values, pass an empty Hash.
609
- # @param options [Gapic::CallOptions, Hash]
610
+ # @param options [::Gapic::CallOptions, ::Hash]
610
611
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
611
612
  #
612
613
  # @overload export_instance(name: nil, output_config: nil)
@@ -614,34 +615,34 @@ module Google
614
615
  # least one keyword argument is required. To specify no parameters, or to keep all
615
616
  # the default parameter values, pass an empty Hash as a request object (see above).
616
617
  #
617
- # @param name [String]
618
+ # @param name [::String]
618
619
  # Required. Redis instance resource name using the form:
619
620
  # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
620
621
  # where `location_id` refers to a GCP region.
621
- # @param output_config [Google::Cloud::Redis::V1::OutputConfig, Hash]
622
+ # @param output_config [::Google::Cloud::Redis::V1::OutputConfig, ::Hash]
622
623
  # Required. Specify data to be exported.
623
624
  #
624
625
  # @yield [response, operation] Access the result along with the RPC operation
625
- # @yieldparam response [Gapic::Operation]
626
- # @yieldparam operation [GRPC::ActiveCall::Operation]
626
+ # @yieldparam response [::Gapic::Operation]
627
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
627
628
  #
628
- # @return [Gapic::Operation]
629
+ # @return [::Gapic::Operation]
629
630
  #
630
- # @raise [Google::Cloud::Error] if the RPC is aborted.
631
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
631
632
  #
632
633
  def export_instance request, options = nil
633
- raise ArgumentError, "request must be provided" if request.nil?
634
+ raise ::ArgumentError, "request must be provided" if request.nil?
634
635
 
635
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::ExportInstanceRequest
636
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::ExportInstanceRequest
636
637
 
637
638
  # Converts hash and nil to an options object
638
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
639
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
639
640
 
640
641
  # Customize the options with defaults
641
642
  metadata = @config.rpcs.export_instance.metadata.to_h
642
643
 
643
644
  # Set x-goog-api-client and x-goog-user-project headers
644
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
645
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
645
646
  lib_name: @config.lib_name, lib_version: @config.lib_version,
646
647
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
647
648
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -659,12 +660,12 @@ module Google
659
660
  retry_policy: @config.retry_policy
660
661
 
661
662
  @cloud_redis_stub.call_rpc :export_instance, request, options: options do |response, operation|
662
- response = Gapic::Operation.new response, @operations_client, options: options
663
+ response = ::Gapic::Operation.new response, @operations_client, options: options
663
664
  yield response, operation if block_given?
664
665
  return response
665
666
  end
666
- rescue GRPC::BadStatus => e
667
- raise Google::Cloud::Error.from_error(e)
667
+ rescue ::GRPC::BadStatus => e
668
+ raise ::Google::Cloud::Error.from_error(e)
668
669
  end
669
670
 
670
671
  ##
@@ -673,12 +674,12 @@ module Google
673
674
  #
674
675
  # @overload failover_instance(request, options = nil)
675
676
  # Pass arguments to `failover_instance` via a request object, either of type
676
- # {Google::Cloud::Redis::V1::FailoverInstanceRequest} or an equivalent Hash.
677
+ # {::Google::Cloud::Redis::V1::FailoverInstanceRequest} or an equivalent Hash.
677
678
  #
678
- # @param request [Google::Cloud::Redis::V1::FailoverInstanceRequest, Hash]
679
+ # @param request [::Google::Cloud::Redis::V1::FailoverInstanceRequest, ::Hash]
679
680
  # A request object representing the call parameters. Required. To specify no
680
681
  # parameters, or to keep all the default parameter values, pass an empty Hash.
681
- # @param options [Gapic::CallOptions, Hash]
682
+ # @param options [::Gapic::CallOptions, ::Hash]
682
683
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
683
684
  #
684
685
  # @overload failover_instance(name: nil, data_protection_mode: nil)
@@ -686,35 +687,35 @@ module Google
686
687
  # least one keyword argument is required. To specify no parameters, or to keep all
687
688
  # the default parameter values, pass an empty Hash as a request object (see above).
688
689
  #
689
- # @param name [String]
690
+ # @param name [::String]
690
691
  # Required. Redis instance resource name using the form:
691
692
  # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
692
693
  # where `location_id` refers to a GCP region.
693
- # @param data_protection_mode [Google::Cloud::Redis::V1::FailoverInstanceRequest::DataProtectionMode]
694
+ # @param data_protection_mode [::Google::Cloud::Redis::V1::FailoverInstanceRequest::DataProtectionMode]
694
695
  # Optional. Available data protection modes that the user can choose. If it's
695
696
  # unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
696
697
  #
697
698
  # @yield [response, operation] Access the result along with the RPC operation
698
- # @yieldparam response [Gapic::Operation]
699
- # @yieldparam operation [GRPC::ActiveCall::Operation]
699
+ # @yieldparam response [::Gapic::Operation]
700
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
700
701
  #
701
- # @return [Gapic::Operation]
702
+ # @return [::Gapic::Operation]
702
703
  #
703
- # @raise [Google::Cloud::Error] if the RPC is aborted.
704
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
704
705
  #
705
706
  def failover_instance request, options = nil
706
- raise ArgumentError, "request must be provided" if request.nil?
707
+ raise ::ArgumentError, "request must be provided" if request.nil?
707
708
 
708
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::FailoverInstanceRequest
709
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::FailoverInstanceRequest
709
710
 
710
711
  # Converts hash and nil to an options object
711
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
712
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
712
713
 
713
714
  # Customize the options with defaults
714
715
  metadata = @config.rpcs.failover_instance.metadata.to_h
715
716
 
716
717
  # Set x-goog-api-client and x-goog-user-project headers
717
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
718
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
718
719
  lib_name: @config.lib_name, lib_version: @config.lib_version,
719
720
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
720
721
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -732,12 +733,12 @@ module Google
732
733
  retry_policy: @config.retry_policy
733
734
 
734
735
  @cloud_redis_stub.call_rpc :failover_instance, request, options: options do |response, operation|
735
- response = Gapic::Operation.new response, @operations_client, options: options
736
+ response = ::Gapic::Operation.new response, @operations_client, options: options
736
737
  yield response, operation if block_given?
737
738
  return response
738
739
  end
739
- rescue GRPC::BadStatus => e
740
- raise Google::Cloud::Error.from_error(e)
740
+ rescue ::GRPC::BadStatus => e
741
+ raise ::Google::Cloud::Error.from_error(e)
741
742
  end
742
743
 
743
744
  ##
@@ -746,12 +747,12 @@ module Google
746
747
  #
747
748
  # @overload delete_instance(request, options = nil)
748
749
  # Pass arguments to `delete_instance` via a request object, either of type
749
- # {Google::Cloud::Redis::V1::DeleteInstanceRequest} or an equivalent Hash.
750
+ # {::Google::Cloud::Redis::V1::DeleteInstanceRequest} or an equivalent Hash.
750
751
  #
751
- # @param request [Google::Cloud::Redis::V1::DeleteInstanceRequest, Hash]
752
+ # @param request [::Google::Cloud::Redis::V1::DeleteInstanceRequest, ::Hash]
752
753
  # A request object representing the call parameters. Required. To specify no
753
754
  # parameters, or to keep all the default parameter values, pass an empty Hash.
754
- # @param options [Gapic::CallOptions, Hash]
755
+ # @param options [::Gapic::CallOptions, ::Hash]
755
756
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
756
757
  #
757
758
  # @overload delete_instance(name: nil)
@@ -759,32 +760,32 @@ module Google
759
760
  # least one keyword argument is required. To specify no parameters, or to keep all
760
761
  # the default parameter values, pass an empty Hash as a request object (see above).
761
762
  #
762
- # @param name [String]
763
+ # @param name [::String]
763
764
  # Required. Redis instance resource name using the form:
764
765
  # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
765
766
  # where `location_id` refers to a GCP region.
766
767
  #
767
768
  # @yield [response, operation] Access the result along with the RPC operation
768
- # @yieldparam response [Gapic::Operation]
769
- # @yieldparam operation [GRPC::ActiveCall::Operation]
769
+ # @yieldparam response [::Gapic::Operation]
770
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
770
771
  #
771
- # @return [Gapic::Operation]
772
+ # @return [::Gapic::Operation]
772
773
  #
773
- # @raise [Google::Cloud::Error] if the RPC is aborted.
774
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
774
775
  #
775
776
  def delete_instance request, options = nil
776
- raise ArgumentError, "request must be provided" if request.nil?
777
+ raise ::ArgumentError, "request must be provided" if request.nil?
777
778
 
778
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1::DeleteInstanceRequest
779
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::DeleteInstanceRequest
779
780
 
780
781
  # Converts hash and nil to an options object
781
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
782
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
782
783
 
783
784
  # Customize the options with defaults
784
785
  metadata = @config.rpcs.delete_instance.metadata.to_h
785
786
 
786
787
  # Set x-goog-api-client and x-goog-user-project headers
787
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
788
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
788
789
  lib_name: @config.lib_name, lib_version: @config.lib_version,
789
790
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
790
791
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -802,12 +803,12 @@ module Google
802
803
  retry_policy: @config.retry_policy
803
804
 
804
805
  @cloud_redis_stub.call_rpc :delete_instance, request, options: options do |response, operation|
805
- response = Gapic::Operation.new response, @operations_client, options: options
806
+ response = ::Gapic::Operation.new response, @operations_client, options: options
806
807
  yield response, operation if block_given?
807
808
  return response
808
809
  end
809
- rescue GRPC::BadStatus => e
810
- raise Google::Cloud::Error.from_error(e)
810
+ rescue ::GRPC::BadStatus => e
811
+ raise ::Google::Cloud::Error.from_error(e)
811
812
  end
812
813
 
813
814
  ##
@@ -817,7 +818,7 @@ module Google
817
818
  # providing control over timeouts, retry behavior, logging, transport
818
819
  # parameters, and other low-level controls. Certain parameters can also be
819
820
  # applied individually to specific RPCs. See
820
- # {Google::Cloud::Redis::V1::CloudRedis::Client::Configuration::Rpcs}
821
+ # {::Google::Cloud::Redis::V1::CloudRedis::Client::Configuration::Rpcs}
821
822
  # for a list of RPCs that can be configured independently.
822
823
  #
823
824
  # Configuration can be applied globally to all clients, or to a single client
@@ -828,22 +829,22 @@ module Google
828
829
  # To modify the global config, setting the timeout for list_instances
829
830
  # to 20 seconds, and all remaining timeouts to 10 seconds:
830
831
  #
831
- # Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
832
- # config.timeout = 10_000
833
- # config.rpcs.list_instances.timeout = 20_000
832
+ # ::Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
833
+ # config.timeout = 10.0
834
+ # config.rpcs.list_instances.timeout = 20.0
834
835
  # end
835
836
  #
836
837
  # To apply the above configuration only to a new client:
837
838
  #
838
- # client = Google::Cloud::Redis::V1::CloudRedis::Client.new do |config|
839
- # config.timeout = 10_000
840
- # config.rpcs.list_instances.timeout = 20_000
839
+ # client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new do |config|
840
+ # config.timeout = 10.0
841
+ # config.rpcs.list_instances.timeout = 20.0
841
842
  # end
842
843
  #
843
844
  # @!attribute [rw] endpoint
844
845
  # The hostname or hostname:port of the service endpoint.
845
846
  # Defaults to `"redis.googleapis.com"`.
846
- # @return [String]
847
+ # @return [::String]
847
848
  # @!attribute [rw] credentials
848
849
  # Credentials to send with calls. You may provide any of the following types:
849
850
  # * (`String`) The path to a service account key file in JSON format
@@ -855,29 +856,29 @@ module Google
855
856
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
856
857
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
857
858
  # * (`nil`) indicating no credentials
858
- # @return [Object]
859
+ # @return [::Object]
859
860
  # @!attribute [rw] scope
860
861
  # The OAuth scopes
861
- # @return [Array<String>]
862
+ # @return [::Array<::String>]
862
863
  # @!attribute [rw] lib_name
863
864
  # The library name as recorded in instrumentation and logging
864
- # @return [String]
865
+ # @return [::String]
865
866
  # @!attribute [rw] lib_version
866
867
  # The library version as recorded in instrumentation and logging
867
- # @return [String]
868
+ # @return [::String]
868
869
  # @!attribute [rw] channel_args
869
870
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
870
871
  # `GRPC::Core::Channel` object is provided as the credential.
871
- # @return [Hash]
872
+ # @return [::Hash]
872
873
  # @!attribute [rw] interceptors
873
874
  # An array of interceptors that are run before calls are executed.
874
- # @return [Array<GRPC::ClientInterceptor>]
875
+ # @return [::Array<::GRPC::ClientInterceptor>]
875
876
  # @!attribute [rw] timeout
876
- # The call timeout in milliseconds.
877
- # @return [Numeric]
877
+ # The call timeout in seconds.
878
+ # @return [::Numeric]
878
879
  # @!attribute [rw] metadata
879
880
  # Additional gRPC headers to be sent with the call.
880
- # @return [Hash{Symbol=>String}]
881
+ # @return [::Hash{::Symbol=>::String}]
881
882
  # @!attribute [rw] retry_policy
882
883
  # The retry policy. The value is a hash with the following keys:
883
884
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -885,25 +886,29 @@ module Google
885
886
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
886
887
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
887
888
  # trigger a retry.
888
- # @return [Hash]
889
+ # @return [::Hash]
890
+ # @!attribute [rw] quota_project
891
+ # A separate project against which to charge quota.
892
+ # @return [::String]
889
893
  #
890
894
  class Configuration
891
- extend Gapic::Config
895
+ extend ::Gapic::Config
892
896
 
893
- config_attr :endpoint, "redis.googleapis.com", String
894
- config_attr :credentials, nil do |value|
897
+ config_attr :endpoint, "redis.googleapis.com", ::String
898
+ config_attr :credentials, nil do |value|
895
899
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
896
900
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
897
901
  allowed.any? { |klass| klass === value }
898
902
  end
899
- config_attr :scope, nil, String, Array, nil
900
- config_attr :lib_name, nil, String, nil
901
- config_attr :lib_version, nil, String, nil
902
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
903
- config_attr :interceptors, nil, Array, nil
904
- config_attr :timeout, nil, Numeric, nil
905
- config_attr :metadata, nil, Hash, nil
906
- config_attr :retry_policy, nil, Hash, Proc, nil
903
+ config_attr :scope, nil, ::String, ::Array, nil
904
+ config_attr :lib_name, nil, ::String, nil
905
+ config_attr :lib_version, nil, ::String, nil
906
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
907
+ config_attr :interceptors, nil, ::Array, nil
908
+ config_attr :timeout, nil, ::Numeric, nil
909
+ config_attr :metadata, nil, ::Hash, nil
910
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
911
+ config_attr :quota_project, nil, ::String, nil
907
912
 
908
913
  # @private
909
914
  def initialize parent_config = nil
@@ -919,7 +924,7 @@ module Google
919
924
  def rpcs
920
925
  @rpcs ||= begin
921
926
  parent_rpcs = nil
922
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
927
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
923
928
  Rpcs.new parent_rpcs
924
929
  end
925
930
  end
@@ -944,63 +949,63 @@ module Google
944
949
  class Rpcs
945
950
  ##
946
951
  # RPC-specific configuration for `list_instances`
947
- # @return [Gapic::Config::Method]
952
+ # @return [::Gapic::Config::Method]
948
953
  #
949
954
  attr_reader :list_instances
950
955
  ##
951
956
  # RPC-specific configuration for `get_instance`
952
- # @return [Gapic::Config::Method]
957
+ # @return [::Gapic::Config::Method]
953
958
  #
954
959
  attr_reader :get_instance
955
960
  ##
956
961
  # RPC-specific configuration for `create_instance`
957
- # @return [Gapic::Config::Method]
962
+ # @return [::Gapic::Config::Method]
958
963
  #
959
964
  attr_reader :create_instance
960
965
  ##
961
966
  # RPC-specific configuration for `update_instance`
962
- # @return [Gapic::Config::Method]
967
+ # @return [::Gapic::Config::Method]
963
968
  #
964
969
  attr_reader :update_instance
965
970
  ##
966
971
  # RPC-specific configuration for `import_instance`
967
- # @return [Gapic::Config::Method]
972
+ # @return [::Gapic::Config::Method]
968
973
  #
969
974
  attr_reader :import_instance
970
975
  ##
971
976
  # RPC-specific configuration for `export_instance`
972
- # @return [Gapic::Config::Method]
977
+ # @return [::Gapic::Config::Method]
973
978
  #
974
979
  attr_reader :export_instance
975
980
  ##
976
981
  # RPC-specific configuration for `failover_instance`
977
- # @return [Gapic::Config::Method]
982
+ # @return [::Gapic::Config::Method]
978
983
  #
979
984
  attr_reader :failover_instance
980
985
  ##
981
986
  # RPC-specific configuration for `delete_instance`
982
- # @return [Gapic::Config::Method]
987
+ # @return [::Gapic::Config::Method]
983
988
  #
984
989
  attr_reader :delete_instance
985
990
 
986
991
  # @private
987
992
  def initialize parent_rpcs = nil
988
993
  list_instances_config = parent_rpcs&.list_instances if parent_rpcs&.respond_to? :list_instances
989
- @list_instances = Gapic::Config::Method.new list_instances_config
994
+ @list_instances = ::Gapic::Config::Method.new list_instances_config
990
995
  get_instance_config = parent_rpcs&.get_instance if parent_rpcs&.respond_to? :get_instance
991
- @get_instance = Gapic::Config::Method.new get_instance_config
996
+ @get_instance = ::Gapic::Config::Method.new get_instance_config
992
997
  create_instance_config = parent_rpcs&.create_instance if parent_rpcs&.respond_to? :create_instance
993
- @create_instance = Gapic::Config::Method.new create_instance_config
998
+ @create_instance = ::Gapic::Config::Method.new create_instance_config
994
999
  update_instance_config = parent_rpcs&.update_instance if parent_rpcs&.respond_to? :update_instance
995
- @update_instance = Gapic::Config::Method.new update_instance_config
1000
+ @update_instance = ::Gapic::Config::Method.new update_instance_config
996
1001
  import_instance_config = parent_rpcs&.import_instance if parent_rpcs&.respond_to? :import_instance
997
- @import_instance = Gapic::Config::Method.new import_instance_config
1002
+ @import_instance = ::Gapic::Config::Method.new import_instance_config
998
1003
  export_instance_config = parent_rpcs&.export_instance if parent_rpcs&.respond_to? :export_instance
999
- @export_instance = Gapic::Config::Method.new export_instance_config
1004
+ @export_instance = ::Gapic::Config::Method.new export_instance_config
1000
1005
  failover_instance_config = parent_rpcs&.failover_instance if parent_rpcs&.respond_to? :failover_instance
1001
- @failover_instance = Gapic::Config::Method.new failover_instance_config
1006
+ @failover_instance = ::Gapic::Config::Method.new failover_instance_config
1002
1007
  delete_instance_config = parent_rpcs&.delete_instance if parent_rpcs&.respond_to? :delete_instance
1003
- @delete_instance = Gapic::Config::Method.new delete_instance_config
1008
+ @delete_instance = ::Gapic::Config::Method.new delete_instance_config
1004
1009
 
1005
1010
  yield self if block_given?
1006
1011
  end