google-cloud-redis-v1beta1 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/redis/v1beta1.rb +1 -1
- data/lib/google/cloud/redis/v1beta1/cloud_redis.rb +1 -1
- data/lib/google/cloud/redis/v1beta1/cloud_redis/client.rb +201 -201
- data/lib/google/cloud/redis/v1beta1/cloud_redis/credentials.rb +1 -1
- data/lib/google/cloud/redis/v1beta1/cloud_redis/operations.rb +100 -100
- data/lib/google/cloud/redis/v1beta1/cloud_redis/paths.rb +5 -5
- data/lib/google/cloud/redis/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/redis/v1beta1/cloud_redis.rb +111 -111
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb2ec5c9386de7c735110e11e89c510f587f27777e1a27def923a30523bea94a
|
4
|
+
data.tar.gz: fbfd4d89050020e8971db2854d654651e0dd217a5f381aaf58509a1633feb99e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee40e76cf8671c4f8d10129c286f743eef1aa866b2c93dc9ce51e7d7bbff6af02479506032da5f05676444d5e1bfd7002c02b4c7a43a64a987eabeec5b380f6
|
7
|
+
data.tar.gz: 62f49116b6afe316952eca986badc45cb3576c59ac45484e5aa039578df1ae1ac013bed3e380a5fdff34b39e4efb901010ac4f79770984eedfc2ea8944128b20
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export REDIS_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/redis/v1beta1"
|
29
29
|
|
30
|
-
client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
30
|
+
client = ::Google::Cloud::Redis::V1beta1::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-v1beta1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::Redis::V1beta1::CloudRedis::Credentials}):
|
67
|
+
{::Google::Cloud::Redis::V1beta1::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/v1beta1"
|
|
77
77
|
|
78
78
|
ENV["REDIS_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
80
|
+
client = ::Google::Cloud::Redis::V1beta1::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/v1beta1"
|
90
90
|
|
91
|
-
client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::Redis::V1beta1::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/v1beta1"
|
100
100
|
|
101
|
-
Google::Cloud::Redis::V1beta1::CloudRedis::Client.configure do |config|
|
101
|
+
::Google::Cloud::Redis::V1beta1::CloudRedis::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
105
|
+
client = ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
25
|
```ruby
|
26
26
|
require "google/cloud/redis/v1beta1"
|
27
27
|
|
28
|
-
client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
28
|
+
client = ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
29
29
|
request = my_create_request
|
30
30
|
response = client.list_instances request
|
31
31
|
```
|
@@ -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/v1beta1"
|
29
|
-
# client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
29
|
+
# client = ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
30
30
|
#
|
31
31
|
module V1beta1
|
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/v1beta1/cloud_redis"
|
54
|
-
# client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
54
|
+
# client = ::Google::Cloud::Redis::V1beta1::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::V1beta1::CloudRedis::Client::Configuration}
|
55
|
+
# See {::Google::Cloud::Redis::V1beta1::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::V1beta1::CloudRedis::Client.configure do |config|
|
63
|
-
# config.timeout =
|
62
|
+
# ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.configure do |config|
|
63
|
+
# config.timeout = 10.0
|
64
64
|
# end
|
65
65
|
#
|
66
66
|
# @yield [config] Configure the Client client.
|
@@ -110,7 +110,7 @@ module Google
|
|
110
110
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
111
111
|
# should be made on {Client.configure}.
|
112
112
|
#
|
113
|
-
# See {Google::Cloud::Redis::V1beta1::CloudRedis::Client::Configuration}
|
113
|
+
# See {::Google::Cloud::Redis::V1beta1::CloudRedis::Client::Configuration}
|
114
114
|
# for a description of the configuration fields.
|
115
115
|
#
|
116
116
|
# @yield [config] Configure the Client client.
|
@@ -131,13 +131,13 @@ module Google
|
|
131
131
|
# To create a new CloudRedis client with the default
|
132
132
|
# configuration:
|
133
133
|
#
|
134
|
-
# client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
134
|
+
# client = ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.new
|
135
135
|
#
|
136
136
|
# To create a new CloudRedis client with a custom
|
137
137
|
# configuration:
|
138
138
|
#
|
139
|
-
# client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new do |config|
|
140
|
-
# config.timeout =
|
139
|
+
# client = ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.new do |config|
|
140
|
+
# config.timeout = 10.0
|
141
141
|
# end
|
142
142
|
#
|
143
143
|
# @yield [config] Configure the CloudRedis client.
|
@@ -169,8 +169,8 @@ module Google
|
|
169
169
|
config.endpoint = @config.endpoint
|
170
170
|
end
|
171
171
|
|
172
|
-
@cloud_redis_stub = Gapic::ServiceStub.new(
|
173
|
-
Google::Cloud::Redis::V1beta1::CloudRedis::Stub,
|
172
|
+
@cloud_redis_stub = ::Gapic::ServiceStub.new(
|
173
|
+
::Google::Cloud::Redis::V1beta1::CloudRedis::Stub,
|
174
174
|
credentials: credentials,
|
175
175
|
endpoint: @config.endpoint,
|
176
176
|
channel_args: @config.channel_args,
|
@@ -181,7 +181,7 @@ module Google
|
|
181
181
|
##
|
182
182
|
# Get the associated client for long-running operations.
|
183
183
|
#
|
184
|
-
# @return [Google::Cloud::Redis::V1beta1::CloudRedis::Operations]
|
184
|
+
# @return [::Google::Cloud::Redis::V1beta1::CloudRedis::Operations]
|
185
185
|
#
|
186
186
|
attr_reader :operations_client
|
187
187
|
|
@@ -200,12 +200,12 @@ module Google
|
|
200
200
|
#
|
201
201
|
# @overload list_instances(request, options = nil)
|
202
202
|
# Pass arguments to `list_instances` via a request object, either of type
|
203
|
-
# {Google::Cloud::Redis::V1beta1::ListInstancesRequest} or an equivalent Hash.
|
203
|
+
# {::Google::Cloud::Redis::V1beta1::ListInstancesRequest} or an equivalent Hash.
|
204
204
|
#
|
205
|
-
# @param request [Google::Cloud::Redis::V1beta1::ListInstancesRequest, Hash]
|
205
|
+
# @param request [::Google::Cloud::Redis::V1beta1::ListInstancesRequest, ::Hash]
|
206
206
|
# A request object representing the call parameters. Required. To specify no
|
207
207
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
208
|
-
# @param options [Gapic::CallOptions, Hash]
|
208
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
209
209
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
210
210
|
#
|
211
211
|
# @overload list_instances(parent: nil, page_size: nil, page_token: nil)
|
@@ -213,43 +213,43 @@ module Google
|
|
213
213
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
214
214
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
215
215
|
#
|
216
|
-
# @param parent [String]
|
216
|
+
# @param parent [::String]
|
217
217
|
# Required. The resource name of the instance location using the form:
|
218
218
|
# `projects/{project_id}/locations/{location_id}`
|
219
219
|
# where `location_id` refers to a GCP region.
|
220
|
-
# @param page_size [Integer]
|
220
|
+
# @param page_size [::Integer]
|
221
221
|
# The maximum number of items to return.
|
222
222
|
#
|
223
223
|
# If not specified, a default value of 1000 will be used by the service.
|
224
224
|
# Regardless of the page_size value, the response may include a partial list
|
225
225
|
# and a caller should only rely on response's
|
226
|
-
# {Google::Cloud::Redis::V1beta1::ListInstancesResponse#next_page_token `next_page_token`}
|
226
|
+
# {::Google::Cloud::Redis::V1beta1::ListInstancesResponse#next_page_token `next_page_token`}
|
227
227
|
# to determine if there are more instances left to be queried.
|
228
|
-
# @param page_token [String]
|
228
|
+
# @param page_token [::String]
|
229
229
|
# The `next_page_token` value returned from a previous
|
230
|
-
# {Google::Cloud::Redis::V1beta1::CloudRedis::Client#list_instances ListInstances} request, if any.
|
230
|
+
# {::Google::Cloud::Redis::V1beta1::CloudRedis::Client#list_instances ListInstances} request, if any.
|
231
231
|
#
|
232
232
|
# @yield [response, operation] Access the result along with the RPC operation
|
233
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
234
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
233
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::V1beta1::Instance>]
|
234
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
235
235
|
#
|
236
|
-
# @return [Gapic::PagedEnumerable
|
236
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::V1beta1::Instance>]
|
237
237
|
#
|
238
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
238
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
239
239
|
#
|
240
240
|
def list_instances request, options = nil
|
241
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
241
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
242
242
|
|
243
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::ListInstancesRequest
|
243
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::ListInstancesRequest
|
244
244
|
|
245
245
|
# Converts hash and nil to an options object
|
246
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
246
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
247
247
|
|
248
248
|
# Customize the options with defaults
|
249
249
|
metadata = @config.rpcs.list_instances.metadata.to_h
|
250
250
|
|
251
251
|
# Set x-goog-api-client and x-goog-user-project headers
|
252
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
252
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
253
253
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
254
254
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
255
255
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -267,12 +267,12 @@ module Google
|
|
267
267
|
retry_policy: @config.retry_policy
|
268
268
|
|
269
269
|
@cloud_redis_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
270
|
-
response = Gapic::PagedEnumerable.new @cloud_redis_stub, :list_instances, request, response, operation, options
|
270
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_stub, :list_instances, request, response, operation, options
|
271
271
|
yield response, operation if block_given?
|
272
272
|
return response
|
273
273
|
end
|
274
|
-
rescue GRPC::BadStatus => e
|
275
|
-
raise Google::Cloud::Error.from_error(e)
|
274
|
+
rescue ::GRPC::BadStatus => e
|
275
|
+
raise ::Google::Cloud::Error.from_error(e)
|
276
276
|
end
|
277
277
|
|
278
278
|
##
|
@@ -280,12 +280,12 @@ module Google
|
|
280
280
|
#
|
281
281
|
# @overload get_instance(request, options = nil)
|
282
282
|
# Pass arguments to `get_instance` via a request object, either of type
|
283
|
-
# {Google::Cloud::Redis::V1beta1::GetInstanceRequest} or an equivalent Hash.
|
283
|
+
# {::Google::Cloud::Redis::V1beta1::GetInstanceRequest} or an equivalent Hash.
|
284
284
|
#
|
285
|
-
# @param request [Google::Cloud::Redis::V1beta1::GetInstanceRequest, Hash]
|
285
|
+
# @param request [::Google::Cloud::Redis::V1beta1::GetInstanceRequest, ::Hash]
|
286
286
|
# A request object representing the call parameters. Required. To specify no
|
287
287
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
288
|
-
# @param options [Gapic::CallOptions, Hash]
|
288
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
289
289
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
290
290
|
#
|
291
291
|
# @overload get_instance(name: nil)
|
@@ -293,32 +293,32 @@ module Google
|
|
293
293
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
294
294
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
295
295
|
#
|
296
|
-
# @param name [String]
|
296
|
+
# @param name [::String]
|
297
297
|
# Required. Redis instance resource name using the form:
|
298
298
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
299
299
|
# where `location_id` refers to a GCP region.
|
300
300
|
#
|
301
301
|
# @yield [response, operation] Access the result along with the RPC operation
|
302
|
-
# @yieldparam response [Google::Cloud::Redis::V1beta1::Instance]
|
303
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
302
|
+
# @yieldparam response [::Google::Cloud::Redis::V1beta1::Instance]
|
303
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
304
304
|
#
|
305
|
-
# @return [Google::Cloud::Redis::V1beta1::Instance]
|
305
|
+
# @return [::Google::Cloud::Redis::V1beta1::Instance]
|
306
306
|
#
|
307
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
307
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
308
308
|
#
|
309
309
|
def get_instance request, options = nil
|
310
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
310
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
311
311
|
|
312
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::GetInstanceRequest
|
312
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::GetInstanceRequest
|
313
313
|
|
314
314
|
# Converts hash and nil to an options object
|
315
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
315
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
316
316
|
|
317
317
|
# Customize the options with defaults
|
318
318
|
metadata = @config.rpcs.get_instance.metadata.to_h
|
319
319
|
|
320
320
|
# Set x-goog-api-client and x-goog-user-project headers
|
321
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
321
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
322
322
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
323
323
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
324
324
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -339,8 +339,8 @@ module Google
|
|
339
339
|
yield response, operation if block_given?
|
340
340
|
return response
|
341
341
|
end
|
342
|
-
rescue GRPC::BadStatus => e
|
343
|
-
raise Google::Cloud::Error.from_error(e)
|
342
|
+
rescue ::GRPC::BadStatus => e
|
343
|
+
raise ::Google::Cloud::Error.from_error(e)
|
344
344
|
end
|
345
345
|
|
346
346
|
##
|
@@ -359,12 +359,12 @@ module Google
|
|
359
359
|
#
|
360
360
|
# @overload create_instance(request, options = nil)
|
361
361
|
# Pass arguments to `create_instance` via a request object, either of type
|
362
|
-
# {Google::Cloud::Redis::V1beta1::CreateInstanceRequest} or an equivalent Hash.
|
362
|
+
# {::Google::Cloud::Redis::V1beta1::CreateInstanceRequest} or an equivalent Hash.
|
363
363
|
#
|
364
|
-
# @param request [Google::Cloud::Redis::V1beta1::CreateInstanceRequest, Hash]
|
364
|
+
# @param request [::Google::Cloud::Redis::V1beta1::CreateInstanceRequest, ::Hash]
|
365
365
|
# A request object representing the call parameters. Required. To specify no
|
366
366
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
367
|
-
# @param options [Gapic::CallOptions, Hash]
|
367
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
368
368
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
369
369
|
#
|
370
370
|
# @overload create_instance(parent: nil, instance_id: nil, instance: nil)
|
@@ -372,11 +372,11 @@ module Google
|
|
372
372
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
373
373
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
374
374
|
#
|
375
|
-
# @param parent [String]
|
375
|
+
# @param parent [::String]
|
376
376
|
# Required. The resource name of the instance location using the form:
|
377
377
|
# `projects/{project_id}/locations/{location_id}`
|
378
378
|
# where `location_id` refers to a GCP region.
|
379
|
-
# @param instance_id [String]
|
379
|
+
# @param instance_id [::String]
|
380
380
|
# Required. The logical name of the Redis instance in the customer project
|
381
381
|
# with the following restrictions:
|
382
382
|
#
|
@@ -385,30 +385,30 @@ module Google
|
|
385
385
|
# * Must be between 1-40 characters.
|
386
386
|
# * Must end with a number or a letter.
|
387
387
|
# * Must be unique within the customer project / location
|
388
|
-
# @param instance [Google::Cloud::Redis::V1beta1::Instance, Hash]
|
388
|
+
# @param instance [::Google::Cloud::Redis::V1beta1::Instance, ::Hash]
|
389
389
|
# Required. A Redis [Instance] resource
|
390
390
|
#
|
391
391
|
# @yield [response, operation] Access the result along with the RPC operation
|
392
|
-
# @yieldparam response [Gapic::Operation]
|
393
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
392
|
+
# @yieldparam response [::Gapic::Operation]
|
393
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
394
394
|
#
|
395
|
-
# @return [Gapic::Operation]
|
395
|
+
# @return [::Gapic::Operation]
|
396
396
|
#
|
397
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
397
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
398
398
|
#
|
399
399
|
def create_instance request, options = nil
|
400
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
400
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
401
401
|
|
402
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::CreateInstanceRequest
|
402
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::CreateInstanceRequest
|
403
403
|
|
404
404
|
# Converts hash and nil to an options object
|
405
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
405
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
406
406
|
|
407
407
|
# Customize the options with defaults
|
408
408
|
metadata = @config.rpcs.create_instance.metadata.to_h
|
409
409
|
|
410
410
|
# Set x-goog-api-client and x-goog-user-project headers
|
411
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
411
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
412
412
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
413
413
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
414
414
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -426,12 +426,12 @@ module Google
|
|
426
426
|
retry_policy: @config.retry_policy
|
427
427
|
|
428
428
|
@cloud_redis_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
429
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
429
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
430
430
|
yield response, operation if block_given?
|
431
431
|
return response
|
432
432
|
end
|
433
|
-
rescue GRPC::BadStatus => e
|
434
|
-
raise Google::Cloud::Error.from_error(e)
|
433
|
+
rescue ::GRPC::BadStatus => e
|
434
|
+
raise ::Google::Cloud::Error.from_error(e)
|
435
435
|
end
|
436
436
|
|
437
437
|
##
|
@@ -443,12 +443,12 @@ module Google
|
|
443
443
|
#
|
444
444
|
# @overload update_instance(request, options = nil)
|
445
445
|
# Pass arguments to `update_instance` via a request object, either of type
|
446
|
-
# {Google::Cloud::Redis::V1beta1::UpdateInstanceRequest} or an equivalent Hash.
|
446
|
+
# {::Google::Cloud::Redis::V1beta1::UpdateInstanceRequest} or an equivalent Hash.
|
447
447
|
#
|
448
|
-
# @param request [Google::Cloud::Redis::V1beta1::UpdateInstanceRequest, Hash]
|
448
|
+
# @param request [::Google::Cloud::Redis::V1beta1::UpdateInstanceRequest, ::Hash]
|
449
449
|
# A request object representing the call parameters. Required. To specify no
|
450
450
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
451
|
-
# @param options [Gapic::CallOptions, Hash]
|
451
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
452
452
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
453
453
|
#
|
454
454
|
# @overload update_instance(update_mask: nil, instance: nil)
|
@@ -456,40 +456,40 @@ module Google
|
|
456
456
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
457
457
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
458
458
|
#
|
459
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
459
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
460
460
|
# Required. Mask of fields to update. At least one path must be supplied in
|
461
461
|
# this field. The elements of the repeated paths field may only include these
|
462
|
-
# fields from {Google::Cloud::Redis::V1beta1::Instance Instance}:
|
462
|
+
# fields from {::Google::Cloud::Redis::V1beta1::Instance Instance}:
|
463
463
|
#
|
464
464
|
# * `displayName`
|
465
465
|
# * `labels`
|
466
466
|
# * `memorySizeGb`
|
467
467
|
# * `redisConfig`
|
468
|
-
# @param instance [Google::Cloud::Redis::V1beta1::Instance, Hash]
|
468
|
+
# @param instance [::Google::Cloud::Redis::V1beta1::Instance, ::Hash]
|
469
469
|
# Required. Update description.
|
470
470
|
# Only fields specified in update_mask are updated.
|
471
471
|
#
|
472
472
|
# @yield [response, operation] Access the result along with the RPC operation
|
473
|
-
# @yieldparam response [Gapic::Operation]
|
474
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
473
|
+
# @yieldparam response [::Gapic::Operation]
|
474
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
475
475
|
#
|
476
|
-
# @return [Gapic::Operation]
|
476
|
+
# @return [::Gapic::Operation]
|
477
477
|
#
|
478
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
478
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
479
479
|
#
|
480
480
|
def update_instance request, options = nil
|
481
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
481
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
482
482
|
|
483
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::UpdateInstanceRequest
|
483
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::UpdateInstanceRequest
|
484
484
|
|
485
485
|
# Converts hash and nil to an options object
|
486
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
486
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
487
487
|
|
488
488
|
# Customize the options with defaults
|
489
489
|
metadata = @config.rpcs.update_instance.metadata.to_h
|
490
490
|
|
491
491
|
# Set x-goog-api-client and x-goog-user-project headers
|
492
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
492
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
493
493
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
494
494
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
495
495
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -507,12 +507,12 @@ module Google
|
|
507
507
|
retry_policy: @config.retry_policy
|
508
508
|
|
509
509
|
@cloud_redis_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
510
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
510
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
511
511
|
yield response, operation if block_given?
|
512
512
|
return response
|
513
513
|
end
|
514
|
-
rescue GRPC::BadStatus => e
|
515
|
-
raise Google::Cloud::Error.from_error(e)
|
514
|
+
rescue ::GRPC::BadStatus => e
|
515
|
+
raise ::Google::Cloud::Error.from_error(e)
|
516
516
|
end
|
517
517
|
|
518
518
|
##
|
@@ -521,12 +521,12 @@ module Google
|
|
521
521
|
#
|
522
522
|
# @overload upgrade_instance(request, options = nil)
|
523
523
|
# Pass arguments to `upgrade_instance` via a request object, either of type
|
524
|
-
# {Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest} or an equivalent Hash.
|
524
|
+
# {::Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest} or an equivalent Hash.
|
525
525
|
#
|
526
|
-
# @param request [Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest, Hash]
|
526
|
+
# @param request [::Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest, ::Hash]
|
527
527
|
# A request object representing the call parameters. Required. To specify no
|
528
528
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
529
|
-
# @param options [Gapic::CallOptions, Hash]
|
529
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
530
530
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
531
531
|
#
|
532
532
|
# @overload upgrade_instance(name: nil, redis_version: nil)
|
@@ -534,34 +534,34 @@ module Google
|
|
534
534
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
535
535
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
536
536
|
#
|
537
|
-
# @param name [String]
|
537
|
+
# @param name [::String]
|
538
538
|
# Required. Redis instance resource name using the form:
|
539
539
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
540
540
|
# where `location_id` refers to a GCP region.
|
541
|
-
# @param redis_version [String]
|
541
|
+
# @param redis_version [::String]
|
542
542
|
# Required. Specifies the target version of Redis software to upgrade to.
|
543
543
|
#
|
544
544
|
# @yield [response, operation] Access the result along with the RPC operation
|
545
|
-
# @yieldparam response [Gapic::Operation]
|
546
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
545
|
+
# @yieldparam response [::Gapic::Operation]
|
546
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
547
547
|
#
|
548
|
-
# @return [Gapic::Operation]
|
548
|
+
# @return [::Gapic::Operation]
|
549
549
|
#
|
550
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
550
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
551
551
|
#
|
552
552
|
def upgrade_instance request, options = nil
|
553
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
553
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
554
554
|
|
555
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest
|
555
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest
|
556
556
|
|
557
557
|
# Converts hash and nil to an options object
|
558
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
558
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
559
559
|
|
560
560
|
# Customize the options with defaults
|
561
561
|
metadata = @config.rpcs.upgrade_instance.metadata.to_h
|
562
562
|
|
563
563
|
# Set x-goog-api-client and x-goog-user-project headers
|
564
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
564
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
565
565
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
566
566
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
567
567
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -579,12 +579,12 @@ module Google
|
|
579
579
|
retry_policy: @config.retry_policy
|
580
580
|
|
581
581
|
@cloud_redis_stub.call_rpc :upgrade_instance, request, options: options do |response, operation|
|
582
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
582
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
583
583
|
yield response, operation if block_given?
|
584
584
|
return response
|
585
585
|
end
|
586
|
-
rescue GRPC::BadStatus => e
|
587
|
-
raise Google::Cloud::Error.from_error(e)
|
586
|
+
rescue ::GRPC::BadStatus => e
|
587
|
+
raise ::Google::Cloud::Error.from_error(e)
|
588
588
|
end
|
589
589
|
|
590
590
|
##
|
@@ -599,12 +599,12 @@ module Google
|
|
599
599
|
#
|
600
600
|
# @overload import_instance(request, options = nil)
|
601
601
|
# Pass arguments to `import_instance` via a request object, either of type
|
602
|
-
# {Google::Cloud::Redis::V1beta1::ImportInstanceRequest} or an equivalent Hash.
|
602
|
+
# {::Google::Cloud::Redis::V1beta1::ImportInstanceRequest} or an equivalent Hash.
|
603
603
|
#
|
604
|
-
# @param request [Google::Cloud::Redis::V1beta1::ImportInstanceRequest, Hash]
|
604
|
+
# @param request [::Google::Cloud::Redis::V1beta1::ImportInstanceRequest, ::Hash]
|
605
605
|
# A request object representing the call parameters. Required. To specify no
|
606
606
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
607
|
-
# @param options [Gapic::CallOptions, Hash]
|
607
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
608
608
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
609
609
|
#
|
610
610
|
# @overload import_instance(name: nil, input_config: nil)
|
@@ -612,34 +612,34 @@ module Google
|
|
612
612
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
613
613
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
614
614
|
#
|
615
|
-
# @param name [String]
|
615
|
+
# @param name [::String]
|
616
616
|
# Required. Redis instance resource name using the form:
|
617
617
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
618
618
|
# where `location_id` refers to a GCP region.
|
619
|
-
# @param input_config [Google::Cloud::Redis::V1beta1::InputConfig, Hash]
|
619
|
+
# @param input_config [::Google::Cloud::Redis::V1beta1::InputConfig, ::Hash]
|
620
620
|
# Required. Specify data to be imported.
|
621
621
|
#
|
622
622
|
# @yield [response, operation] Access the result along with the RPC operation
|
623
|
-
# @yieldparam response [Gapic::Operation]
|
624
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
623
|
+
# @yieldparam response [::Gapic::Operation]
|
624
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
625
625
|
#
|
626
|
-
# @return [Gapic::Operation]
|
626
|
+
# @return [::Gapic::Operation]
|
627
627
|
#
|
628
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
628
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
629
629
|
#
|
630
630
|
def import_instance request, options = nil
|
631
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
631
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
632
632
|
|
633
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::ImportInstanceRequest
|
633
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::ImportInstanceRequest
|
634
634
|
|
635
635
|
# Converts hash and nil to an options object
|
636
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
636
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
637
637
|
|
638
638
|
# Customize the options with defaults
|
639
639
|
metadata = @config.rpcs.import_instance.metadata.to_h
|
640
640
|
|
641
641
|
# Set x-goog-api-client and x-goog-user-project headers
|
642
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
642
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
643
643
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
644
644
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
645
645
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -657,12 +657,12 @@ module Google
|
|
657
657
|
retry_policy: @config.retry_policy
|
658
658
|
|
659
659
|
@cloud_redis_stub.call_rpc :import_instance, request, options: options do |response, operation|
|
660
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
660
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
661
661
|
yield response, operation if block_given?
|
662
662
|
return response
|
663
663
|
end
|
664
|
-
rescue GRPC::BadStatus => e
|
665
|
-
raise Google::Cloud::Error.from_error(e)
|
664
|
+
rescue ::GRPC::BadStatus => e
|
665
|
+
raise ::Google::Cloud::Error.from_error(e)
|
666
666
|
end
|
667
667
|
|
668
668
|
##
|
@@ -675,12 +675,12 @@ module Google
|
|
675
675
|
#
|
676
676
|
# @overload export_instance(request, options = nil)
|
677
677
|
# Pass arguments to `export_instance` via a request object, either of type
|
678
|
-
# {Google::Cloud::Redis::V1beta1::ExportInstanceRequest} or an equivalent Hash.
|
678
|
+
# {::Google::Cloud::Redis::V1beta1::ExportInstanceRequest} or an equivalent Hash.
|
679
679
|
#
|
680
|
-
# @param request [Google::Cloud::Redis::V1beta1::ExportInstanceRequest, Hash]
|
680
|
+
# @param request [::Google::Cloud::Redis::V1beta1::ExportInstanceRequest, ::Hash]
|
681
681
|
# A request object representing the call parameters. Required. To specify no
|
682
682
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
683
|
-
# @param options [Gapic::CallOptions, Hash]
|
683
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
684
684
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
685
685
|
#
|
686
686
|
# @overload export_instance(name: nil, output_config: nil)
|
@@ -688,34 +688,34 @@ module Google
|
|
688
688
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
689
689
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
690
690
|
#
|
691
|
-
# @param name [String]
|
691
|
+
# @param name [::String]
|
692
692
|
# Required. Redis instance resource name using the form:
|
693
693
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
694
694
|
# where `location_id` refers to a GCP region.
|
695
|
-
# @param output_config [Google::Cloud::Redis::V1beta1::OutputConfig, Hash]
|
695
|
+
# @param output_config [::Google::Cloud::Redis::V1beta1::OutputConfig, ::Hash]
|
696
696
|
# Required. Specify data to be exported.
|
697
697
|
#
|
698
698
|
# @yield [response, operation] Access the result along with the RPC operation
|
699
|
-
# @yieldparam response [Gapic::Operation]
|
700
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
699
|
+
# @yieldparam response [::Gapic::Operation]
|
700
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
701
701
|
#
|
702
|
-
# @return [Gapic::Operation]
|
702
|
+
# @return [::Gapic::Operation]
|
703
703
|
#
|
704
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
704
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
705
705
|
#
|
706
706
|
def export_instance request, options = nil
|
707
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
707
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
708
708
|
|
709
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::ExportInstanceRequest
|
709
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::ExportInstanceRequest
|
710
710
|
|
711
711
|
# Converts hash and nil to an options object
|
712
|
-
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
|
713
713
|
|
714
714
|
# Customize the options with defaults
|
715
715
|
metadata = @config.rpcs.export_instance.metadata.to_h
|
716
716
|
|
717
717
|
# Set x-goog-api-client and x-goog-user-project headers
|
718
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
718
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
719
719
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
720
720
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
721
721
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -733,12 +733,12 @@ module Google
|
|
733
733
|
retry_policy: @config.retry_policy
|
734
734
|
|
735
735
|
@cloud_redis_stub.call_rpc :export_instance, request, options: options do |response, operation|
|
736
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
736
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
737
737
|
yield response, operation if block_given?
|
738
738
|
return response
|
739
739
|
end
|
740
|
-
rescue GRPC::BadStatus => e
|
741
|
-
raise Google::Cloud::Error.from_error(e)
|
740
|
+
rescue ::GRPC::BadStatus => e
|
741
|
+
raise ::Google::Cloud::Error.from_error(e)
|
742
742
|
end
|
743
743
|
|
744
744
|
##
|
@@ -747,12 +747,12 @@ module Google
|
|
747
747
|
#
|
748
748
|
# @overload failover_instance(request, options = nil)
|
749
749
|
# Pass arguments to `failover_instance` via a request object, either of type
|
750
|
-
# {Google::Cloud::Redis::V1beta1::FailoverInstanceRequest} or an equivalent Hash.
|
750
|
+
# {::Google::Cloud::Redis::V1beta1::FailoverInstanceRequest} or an equivalent Hash.
|
751
751
|
#
|
752
|
-
# @param request [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest, Hash]
|
752
|
+
# @param request [::Google::Cloud::Redis::V1beta1::FailoverInstanceRequest, ::Hash]
|
753
753
|
# A request object representing the call parameters. Required. To specify no
|
754
754
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
755
|
-
# @param options [Gapic::CallOptions, Hash]
|
755
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
756
756
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
757
757
|
#
|
758
758
|
# @overload failover_instance(name: nil, data_protection_mode: nil)
|
@@ -760,35 +760,35 @@ module Google
|
|
760
760
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
761
761
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
762
762
|
#
|
763
|
-
# @param name [String]
|
763
|
+
# @param name [::String]
|
764
764
|
# Required. Redis instance resource name using the form:
|
765
765
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
766
766
|
# where `location_id` refers to a GCP region.
|
767
|
-
# @param data_protection_mode [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
|
767
|
+
# @param data_protection_mode [::Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
|
768
768
|
# Optional. Available data protection modes that the user can choose. If it's
|
769
769
|
# unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
|
770
770
|
#
|
771
771
|
# @yield [response, operation] Access the result along with the RPC operation
|
772
|
-
# @yieldparam response [Gapic::Operation]
|
773
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
772
|
+
# @yieldparam response [::Gapic::Operation]
|
773
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
774
774
|
#
|
775
|
-
# @return [Gapic::Operation]
|
775
|
+
# @return [::Gapic::Operation]
|
776
776
|
#
|
777
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
777
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
778
778
|
#
|
779
779
|
def failover_instance request, options = nil
|
780
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
780
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
781
781
|
|
782
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::FailoverInstanceRequest
|
782
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::FailoverInstanceRequest
|
783
783
|
|
784
784
|
# Converts hash and nil to an options object
|
785
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
785
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
786
786
|
|
787
787
|
# Customize the options with defaults
|
788
788
|
metadata = @config.rpcs.failover_instance.metadata.to_h
|
789
789
|
|
790
790
|
# Set x-goog-api-client and x-goog-user-project headers
|
791
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
791
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
792
792
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
793
793
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
794
794
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -806,12 +806,12 @@ module Google
|
|
806
806
|
retry_policy: @config.retry_policy
|
807
807
|
|
808
808
|
@cloud_redis_stub.call_rpc :failover_instance, request, options: options do |response, operation|
|
809
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
809
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
810
810
|
yield response, operation if block_given?
|
811
811
|
return response
|
812
812
|
end
|
813
|
-
rescue GRPC::BadStatus => e
|
814
|
-
raise Google::Cloud::Error.from_error(e)
|
813
|
+
rescue ::GRPC::BadStatus => e
|
814
|
+
raise ::Google::Cloud::Error.from_error(e)
|
815
815
|
end
|
816
816
|
|
817
817
|
##
|
@@ -820,12 +820,12 @@ module Google
|
|
820
820
|
#
|
821
821
|
# @overload delete_instance(request, options = nil)
|
822
822
|
# Pass arguments to `delete_instance` via a request object, either of type
|
823
|
-
# {Google::Cloud::Redis::V1beta1::DeleteInstanceRequest} or an equivalent Hash.
|
823
|
+
# {::Google::Cloud::Redis::V1beta1::DeleteInstanceRequest} or an equivalent Hash.
|
824
824
|
#
|
825
|
-
# @param request [Google::Cloud::Redis::V1beta1::DeleteInstanceRequest, Hash]
|
825
|
+
# @param request [::Google::Cloud::Redis::V1beta1::DeleteInstanceRequest, ::Hash]
|
826
826
|
# A request object representing the call parameters. Required. To specify no
|
827
827
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
828
|
-
# @param options [Gapic::CallOptions, Hash]
|
828
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
829
829
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
830
830
|
#
|
831
831
|
# @overload delete_instance(name: nil)
|
@@ -833,32 +833,32 @@ module Google
|
|
833
833
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
834
834
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
835
835
|
#
|
836
|
-
# @param name [String]
|
836
|
+
# @param name [::String]
|
837
837
|
# Required. Redis instance resource name using the form:
|
838
838
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
839
839
|
# where `location_id` refers to a GCP region.
|
840
840
|
#
|
841
841
|
# @yield [response, operation] Access the result along with the RPC operation
|
842
|
-
# @yieldparam response [Gapic::Operation]
|
843
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
842
|
+
# @yieldparam response [::Gapic::Operation]
|
843
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
844
844
|
#
|
845
|
-
# @return [Gapic::Operation]
|
845
|
+
# @return [::Gapic::Operation]
|
846
846
|
#
|
847
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
847
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
848
848
|
#
|
849
849
|
def delete_instance request, options = nil
|
850
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
850
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
851
851
|
|
852
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Redis::V1beta1::DeleteInstanceRequest
|
852
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1beta1::DeleteInstanceRequest
|
853
853
|
|
854
854
|
# Converts hash and nil to an options object
|
855
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
855
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
856
856
|
|
857
857
|
# Customize the options with defaults
|
858
858
|
metadata = @config.rpcs.delete_instance.metadata.to_h
|
859
859
|
|
860
860
|
# Set x-goog-api-client and x-goog-user-project headers
|
861
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
861
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
862
862
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
863
863
|
gapic_version: ::Google::Cloud::Redis::V1beta1::VERSION
|
864
864
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -876,12 +876,12 @@ module Google
|
|
876
876
|
retry_policy: @config.retry_policy
|
877
877
|
|
878
878
|
@cloud_redis_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
879
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
879
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
880
880
|
yield response, operation if block_given?
|
881
881
|
return response
|
882
882
|
end
|
883
|
-
rescue GRPC::BadStatus => e
|
884
|
-
raise Google::Cloud::Error.from_error(e)
|
883
|
+
rescue ::GRPC::BadStatus => e
|
884
|
+
raise ::Google::Cloud::Error.from_error(e)
|
885
885
|
end
|
886
886
|
|
887
887
|
##
|
@@ -891,7 +891,7 @@ module Google
|
|
891
891
|
# providing control over timeouts, retry behavior, logging, transport
|
892
892
|
# parameters, and other low-level controls. Certain parameters can also be
|
893
893
|
# applied individually to specific RPCs. See
|
894
|
-
# {Google::Cloud::Redis::V1beta1::CloudRedis::Client::Configuration::Rpcs}
|
894
|
+
# {::Google::Cloud::Redis::V1beta1::CloudRedis::Client::Configuration::Rpcs}
|
895
895
|
# for a list of RPCs that can be configured independently.
|
896
896
|
#
|
897
897
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -902,22 +902,22 @@ module Google
|
|
902
902
|
# To modify the global config, setting the timeout for list_instances
|
903
903
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
904
904
|
#
|
905
|
-
# Google::Cloud::Redis::V1beta1::CloudRedis::Client.configure do |config|
|
906
|
-
# config.timeout =
|
907
|
-
# config.rpcs.list_instances.timeout =
|
905
|
+
# ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.configure do |config|
|
906
|
+
# config.timeout = 10.0
|
907
|
+
# config.rpcs.list_instances.timeout = 20.0
|
908
908
|
# end
|
909
909
|
#
|
910
910
|
# To apply the above configuration only to a new client:
|
911
911
|
#
|
912
|
-
# client = Google::Cloud::Redis::V1beta1::CloudRedis::Client.new do |config|
|
913
|
-
# config.timeout =
|
914
|
-
# config.rpcs.list_instances.timeout =
|
912
|
+
# client = ::Google::Cloud::Redis::V1beta1::CloudRedis::Client.new do |config|
|
913
|
+
# config.timeout = 10.0
|
914
|
+
# config.rpcs.list_instances.timeout = 20.0
|
915
915
|
# end
|
916
916
|
#
|
917
917
|
# @!attribute [rw] endpoint
|
918
918
|
# The hostname or hostname:port of the service endpoint.
|
919
919
|
# Defaults to `"redis.googleapis.com"`.
|
920
|
-
# @return [String]
|
920
|
+
# @return [::String]
|
921
921
|
# @!attribute [rw] credentials
|
922
922
|
# Credentials to send with calls. You may provide any of the following types:
|
923
923
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -929,29 +929,29 @@ module Google
|
|
929
929
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
930
930
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
931
931
|
# * (`nil`) indicating no credentials
|
932
|
-
# @return [Object]
|
932
|
+
# @return [::Object]
|
933
933
|
# @!attribute [rw] scope
|
934
934
|
# The OAuth scopes
|
935
|
-
# @return [Array
|
935
|
+
# @return [::Array<::String>]
|
936
936
|
# @!attribute [rw] lib_name
|
937
937
|
# The library name as recorded in instrumentation and logging
|
938
|
-
# @return [String]
|
938
|
+
# @return [::String]
|
939
939
|
# @!attribute [rw] lib_version
|
940
940
|
# The library version as recorded in instrumentation and logging
|
941
|
-
# @return [String]
|
941
|
+
# @return [::String]
|
942
942
|
# @!attribute [rw] channel_args
|
943
943
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
944
944
|
# `GRPC::Core::Channel` object is provided as the credential.
|
945
|
-
# @return [Hash]
|
945
|
+
# @return [::Hash]
|
946
946
|
# @!attribute [rw] interceptors
|
947
947
|
# An array of interceptors that are run before calls are executed.
|
948
|
-
# @return [Array
|
948
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
949
949
|
# @!attribute [rw] timeout
|
950
|
-
# The call timeout in
|
951
|
-
# @return [Numeric]
|
950
|
+
# The call timeout in seconds.
|
951
|
+
# @return [::Numeric]
|
952
952
|
# @!attribute [rw] metadata
|
953
953
|
# Additional gRPC headers to be sent with the call.
|
954
|
-
# @return [Hash{Symbol
|
954
|
+
# @return [::Hash{::Symbol=>::String}]
|
955
955
|
# @!attribute [rw] retry_policy
|
956
956
|
# The retry policy. The value is a hash with the following keys:
|
957
957
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -959,10 +959,10 @@ module Google
|
|
959
959
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
960
960
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
961
961
|
# trigger a retry.
|
962
|
-
# @return [Hash]
|
962
|
+
# @return [::Hash]
|
963
963
|
#
|
964
964
|
class Configuration
|
965
|
-
extend Gapic::Config
|
965
|
+
extend ::Gapic::Config
|
966
966
|
|
967
967
|
config_attr :endpoint, "redis.googleapis.com", String
|
968
968
|
config_attr :credentials, nil do |value|
|
@@ -970,14 +970,14 @@ module Google
|
|
970
970
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
971
971
|
allowed.any? { |klass| klass === value }
|
972
972
|
end
|
973
|
-
config_attr :scope, nil, String, Array, nil
|
974
|
-
config_attr :lib_name, nil, String, nil
|
975
|
-
config_attr :lib_version, nil, String, nil
|
976
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
977
|
-
config_attr :interceptors, nil, Array, nil
|
978
|
-
config_attr :timeout, nil, Numeric, nil
|
979
|
-
config_attr :metadata, nil, Hash, nil
|
980
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
973
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
974
|
+
config_attr :lib_name, nil, ::String, nil
|
975
|
+
config_attr :lib_version, nil, ::String, nil
|
976
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
977
|
+
config_attr :interceptors, nil, ::Array, nil
|
978
|
+
config_attr :timeout, nil, ::Numeric, nil
|
979
|
+
config_attr :metadata, nil, ::Hash, nil
|
980
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
981
981
|
|
982
982
|
# @private
|
983
983
|
def initialize parent_config = nil
|
@@ -1018,70 +1018,70 @@ module Google
|
|
1018
1018
|
class Rpcs
|
1019
1019
|
##
|
1020
1020
|
# RPC-specific configuration for `list_instances`
|
1021
|
-
# @return [Gapic::Config::Method]
|
1021
|
+
# @return [::Gapic::Config::Method]
|
1022
1022
|
#
|
1023
1023
|
attr_reader :list_instances
|
1024
1024
|
##
|
1025
1025
|
# RPC-specific configuration for `get_instance`
|
1026
|
-
# @return [Gapic::Config::Method]
|
1026
|
+
# @return [::Gapic::Config::Method]
|
1027
1027
|
#
|
1028
1028
|
attr_reader :get_instance
|
1029
1029
|
##
|
1030
1030
|
# RPC-specific configuration for `create_instance`
|
1031
|
-
# @return [Gapic::Config::Method]
|
1031
|
+
# @return [::Gapic::Config::Method]
|
1032
1032
|
#
|
1033
1033
|
attr_reader :create_instance
|
1034
1034
|
##
|
1035
1035
|
# RPC-specific configuration for `update_instance`
|
1036
|
-
# @return [Gapic::Config::Method]
|
1036
|
+
# @return [::Gapic::Config::Method]
|
1037
1037
|
#
|
1038
1038
|
attr_reader :update_instance
|
1039
1039
|
##
|
1040
1040
|
# RPC-specific configuration for `upgrade_instance`
|
1041
|
-
# @return [Gapic::Config::Method]
|
1041
|
+
# @return [::Gapic::Config::Method]
|
1042
1042
|
#
|
1043
1043
|
attr_reader :upgrade_instance
|
1044
1044
|
##
|
1045
1045
|
# RPC-specific configuration for `import_instance`
|
1046
|
-
# @return [Gapic::Config::Method]
|
1046
|
+
# @return [::Gapic::Config::Method]
|
1047
1047
|
#
|
1048
1048
|
attr_reader :import_instance
|
1049
1049
|
##
|
1050
1050
|
# RPC-specific configuration for `export_instance`
|
1051
|
-
# @return [Gapic::Config::Method]
|
1051
|
+
# @return [::Gapic::Config::Method]
|
1052
1052
|
#
|
1053
1053
|
attr_reader :export_instance
|
1054
1054
|
##
|
1055
1055
|
# RPC-specific configuration for `failover_instance`
|
1056
|
-
# @return [Gapic::Config::Method]
|
1056
|
+
# @return [::Gapic::Config::Method]
|
1057
1057
|
#
|
1058
1058
|
attr_reader :failover_instance
|
1059
1059
|
##
|
1060
1060
|
# RPC-specific configuration for `delete_instance`
|
1061
|
-
# @return [Gapic::Config::Method]
|
1061
|
+
# @return [::Gapic::Config::Method]
|
1062
1062
|
#
|
1063
1063
|
attr_reader :delete_instance
|
1064
1064
|
|
1065
1065
|
# @private
|
1066
1066
|
def initialize parent_rpcs = nil
|
1067
1067
|
list_instances_config = parent_rpcs&.list_instances if parent_rpcs&.respond_to? :list_instances
|
1068
|
-
@list_instances = Gapic::Config::Method.new list_instances_config
|
1068
|
+
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
1069
1069
|
get_instance_config = parent_rpcs&.get_instance if parent_rpcs&.respond_to? :get_instance
|
1070
|
-
@get_instance = Gapic::Config::Method.new get_instance_config
|
1070
|
+
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
1071
1071
|
create_instance_config = parent_rpcs&.create_instance if parent_rpcs&.respond_to? :create_instance
|
1072
|
-
@create_instance = Gapic::Config::Method.new create_instance_config
|
1072
|
+
@create_instance = ::Gapic::Config::Method.new create_instance_config
|
1073
1073
|
update_instance_config = parent_rpcs&.update_instance if parent_rpcs&.respond_to? :update_instance
|
1074
|
-
@update_instance = Gapic::Config::Method.new update_instance_config
|
1074
|
+
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
1075
1075
|
upgrade_instance_config = parent_rpcs&.upgrade_instance if parent_rpcs&.respond_to? :upgrade_instance
|
1076
|
-
@upgrade_instance = Gapic::Config::Method.new upgrade_instance_config
|
1076
|
+
@upgrade_instance = ::Gapic::Config::Method.new upgrade_instance_config
|
1077
1077
|
import_instance_config = parent_rpcs&.import_instance if parent_rpcs&.respond_to? :import_instance
|
1078
|
-
@import_instance = Gapic::Config::Method.new import_instance_config
|
1078
|
+
@import_instance = ::Gapic::Config::Method.new import_instance_config
|
1079
1079
|
export_instance_config = parent_rpcs&.export_instance if parent_rpcs&.respond_to? :export_instance
|
1080
|
-
@export_instance = Gapic::Config::Method.new export_instance_config
|
1080
|
+
@export_instance = ::Gapic::Config::Method.new export_instance_config
|
1081
1081
|
failover_instance_config = parent_rpcs&.failover_instance if parent_rpcs&.respond_to? :failover_instance
|
1082
|
-
@failover_instance = Gapic::Config::Method.new failover_instance_config
|
1082
|
+
@failover_instance = ::Gapic::Config::Method.new failover_instance_config
|
1083
1083
|
delete_instance_config = parent_rpcs&.delete_instance if parent_rpcs&.respond_to? :delete_instance
|
1084
|
-
@delete_instance = Gapic::Config::Method.new delete_instance_config
|
1084
|
+
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
1085
1085
|
|
1086
1086
|
yield self if block_given?
|
1087
1087
|
end
|