google-cloud-redis-cluster-v1 0.4.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/client.rb +1072 -179
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/operations.rb +19 -15
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/paths.rb +139 -0
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/client.rb +957 -125
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/operations.rb +50 -38
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/service_stub.rb +552 -37
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest.rb +0 -6
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb +0 -6
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster_pb.rb +44 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster_services_pb.rb +31 -6
- data/lib/google/cloud/redis/cluster/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb +752 -15
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/timeofday.rb +45 -0
- metadata +9 -9
@@ -31,7 +31,8 @@ module Google
|
|
31
31
|
# including transcoding, making the REST call, and deserialing the response.
|
32
32
|
#
|
33
33
|
class ServiceStub
|
34
|
-
|
34
|
+
# @private
|
35
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
36
|
# These require statements are intentionally placed here to initialize
|
36
37
|
# the REST modules only when it's required.
|
37
38
|
require "gapic/rest"
|
@@ -41,7 +42,9 @@ module Google
|
|
41
42
|
universe_domain: universe_domain,
|
42
43
|
credentials: credentials,
|
43
44
|
numeric_enums: true,
|
44
|
-
|
45
|
+
service_name: self.class,
|
46
|
+
raise_faraday_errors: false,
|
47
|
+
logger: logger
|
45
48
|
end
|
46
49
|
|
47
50
|
##
|
@@ -62,6 +65,15 @@ module Google
|
|
62
65
|
@client_stub.endpoint
|
63
66
|
end
|
64
67
|
|
68
|
+
##
|
69
|
+
# The logger used for request/response debug logging.
|
70
|
+
#
|
71
|
+
# @return [Logger]
|
72
|
+
#
|
73
|
+
def logger stub: false
|
74
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
75
|
+
end
|
76
|
+
|
65
77
|
##
|
66
78
|
# Baseline implementation for the list_clusters REST call
|
67
79
|
#
|
@@ -88,16 +100,18 @@ module Google
|
|
88
100
|
|
89
101
|
response = @client_stub.make_http_request(
|
90
102
|
verb,
|
91
|
-
uri:
|
92
|
-
body:
|
93
|
-
params:
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "list_clusters",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Cloud::Redis::Cluster::V1::ListClustersResponse.decode_json response.body, ignore_unknown_fields: true
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
101
115
|
end
|
102
116
|
|
103
117
|
##
|
@@ -126,16 +140,18 @@ module Google
|
|
126
140
|
|
127
141
|
response = @client_stub.make_http_request(
|
128
142
|
verb,
|
129
|
-
uri:
|
130
|
-
body:
|
131
|
-
params:
|
143
|
+
uri: uri,
|
144
|
+
body: body || "",
|
145
|
+
params: query_string_params,
|
146
|
+
method_name: "get_cluster",
|
132
147
|
options: options
|
133
148
|
)
|
134
149
|
operation = ::Gapic::Rest::TransportOperation.new response
|
135
150
|
result = ::Google::Cloud::Redis::Cluster::V1::Cluster.decode_json response.body, ignore_unknown_fields: true
|
136
|
-
|
137
|
-
|
138
|
-
|
151
|
+
catch :response do
|
152
|
+
yield result, operation if block_given?
|
153
|
+
result
|
154
|
+
end
|
139
155
|
end
|
140
156
|
|
141
157
|
##
|
@@ -164,16 +180,18 @@ module Google
|
|
164
180
|
|
165
181
|
response = @client_stub.make_http_request(
|
166
182
|
verb,
|
167
|
-
uri:
|
168
|
-
body:
|
169
|
-
params:
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
method_name: "update_cluster",
|
170
187
|
options: options
|
171
188
|
)
|
172
189
|
operation = ::Gapic::Rest::TransportOperation.new response
|
173
190
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
174
|
-
|
175
|
-
|
176
|
-
|
191
|
+
catch :response do
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
177
195
|
end
|
178
196
|
|
179
197
|
##
|
@@ -202,16 +220,18 @@ module Google
|
|
202
220
|
|
203
221
|
response = @client_stub.make_http_request(
|
204
222
|
verb,
|
205
|
-
uri:
|
206
|
-
body:
|
207
|
-
params:
|
223
|
+
uri: uri,
|
224
|
+
body: body || "",
|
225
|
+
params: query_string_params,
|
226
|
+
method_name: "delete_cluster",
|
208
227
|
options: options
|
209
228
|
)
|
210
229
|
operation = ::Gapic::Rest::TransportOperation.new response
|
211
230
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
212
|
-
|
213
|
-
|
214
|
-
|
231
|
+
catch :response do
|
232
|
+
yield result, operation if block_given?
|
233
|
+
result
|
234
|
+
end
|
215
235
|
end
|
216
236
|
|
217
237
|
##
|
@@ -240,16 +260,18 @@ module Google
|
|
240
260
|
|
241
261
|
response = @client_stub.make_http_request(
|
242
262
|
verb,
|
243
|
-
uri:
|
244
|
-
body:
|
245
|
-
params:
|
263
|
+
uri: uri,
|
264
|
+
body: body || "",
|
265
|
+
params: query_string_params,
|
266
|
+
method_name: "create_cluster",
|
246
267
|
options: options
|
247
268
|
)
|
248
269
|
operation = ::Gapic::Rest::TransportOperation.new response
|
249
270
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
250
|
-
|
251
|
-
|
252
|
-
|
271
|
+
catch :response do
|
272
|
+
yield result, operation if block_given?
|
273
|
+
result
|
274
|
+
end
|
253
275
|
end
|
254
276
|
|
255
277
|
##
|
@@ -278,16 +300,338 @@ module Google
|
|
278
300
|
|
279
301
|
response = @client_stub.make_http_request(
|
280
302
|
verb,
|
281
|
-
uri:
|
282
|
-
body:
|
283
|
-
params:
|
303
|
+
uri: uri,
|
304
|
+
body: body || "",
|
305
|
+
params: query_string_params,
|
306
|
+
method_name: "get_cluster_certificate_authority",
|
284
307
|
options: options
|
285
308
|
)
|
286
309
|
operation = ::Gapic::Rest::TransportOperation.new response
|
287
310
|
result = ::Google::Cloud::Redis::Cluster::V1::CertificateAuthority.decode_json response.body, ignore_unknown_fields: true
|
311
|
+
catch :response do
|
312
|
+
yield result, operation if block_given?
|
313
|
+
result
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
##
|
318
|
+
# Baseline implementation for the reschedule_cluster_maintenance REST call
|
319
|
+
#
|
320
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest]
|
321
|
+
# A request object representing the call parameters. Required.
|
322
|
+
# @param options [::Gapic::CallOptions]
|
323
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
324
|
+
#
|
325
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
326
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
327
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
328
|
+
#
|
329
|
+
# @return [::Google::Longrunning::Operation]
|
330
|
+
# A result object deserialized from the server's reply
|
331
|
+
def reschedule_cluster_maintenance request_pb, options = nil
|
332
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
333
|
+
|
334
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_reschedule_cluster_maintenance_request request_pb
|
335
|
+
query_string_params = if query_string_params.any?
|
336
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
337
|
+
else
|
338
|
+
{}
|
339
|
+
end
|
340
|
+
|
341
|
+
response = @client_stub.make_http_request(
|
342
|
+
verb,
|
343
|
+
uri: uri,
|
344
|
+
body: body || "",
|
345
|
+
params: query_string_params,
|
346
|
+
method_name: "reschedule_cluster_maintenance",
|
347
|
+
options: options
|
348
|
+
)
|
349
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
350
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
351
|
+
catch :response do
|
352
|
+
yield result, operation if block_given?
|
353
|
+
result
|
354
|
+
end
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# Baseline implementation for the list_backup_collections REST call
|
359
|
+
#
|
360
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest]
|
361
|
+
# A request object representing the call parameters. Required.
|
362
|
+
# @param options [::Gapic::CallOptions]
|
363
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
364
|
+
#
|
365
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
366
|
+
# @yieldparam result [::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsResponse]
|
367
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
368
|
+
#
|
369
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsResponse]
|
370
|
+
# A result object deserialized from the server's reply
|
371
|
+
def list_backup_collections request_pb, options = nil
|
372
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
373
|
+
|
374
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_collections_request request_pb
|
375
|
+
query_string_params = if query_string_params.any?
|
376
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
377
|
+
else
|
378
|
+
{}
|
379
|
+
end
|
380
|
+
|
381
|
+
response = @client_stub.make_http_request(
|
382
|
+
verb,
|
383
|
+
uri: uri,
|
384
|
+
body: body || "",
|
385
|
+
params: query_string_params,
|
386
|
+
method_name: "list_backup_collections",
|
387
|
+
options: options
|
388
|
+
)
|
389
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
390
|
+
result = ::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsResponse.decode_json response.body, ignore_unknown_fields: true
|
391
|
+
catch :response do
|
392
|
+
yield result, operation if block_given?
|
393
|
+
result
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
##
|
398
|
+
# Baseline implementation for the get_backup_collection REST call
|
399
|
+
#
|
400
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest]
|
401
|
+
# A request object representing the call parameters. Required.
|
402
|
+
# @param options [::Gapic::CallOptions]
|
403
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
404
|
+
#
|
405
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
406
|
+
# @yieldparam result [::Google::Cloud::Redis::Cluster::V1::BackupCollection]
|
407
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
408
|
+
#
|
409
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::BackupCollection]
|
410
|
+
# A result object deserialized from the server's reply
|
411
|
+
def get_backup_collection request_pb, options = nil
|
412
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
413
|
+
|
414
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_collection_request request_pb
|
415
|
+
query_string_params = if query_string_params.any?
|
416
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
417
|
+
else
|
418
|
+
{}
|
419
|
+
end
|
420
|
+
|
421
|
+
response = @client_stub.make_http_request(
|
422
|
+
verb,
|
423
|
+
uri: uri,
|
424
|
+
body: body || "",
|
425
|
+
params: query_string_params,
|
426
|
+
method_name: "get_backup_collection",
|
427
|
+
options: options
|
428
|
+
)
|
429
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
430
|
+
result = ::Google::Cloud::Redis::Cluster::V1::BackupCollection.decode_json response.body, ignore_unknown_fields: true
|
431
|
+
catch :response do
|
432
|
+
yield result, operation if block_given?
|
433
|
+
result
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
##
|
438
|
+
# Baseline implementation for the list_backups REST call
|
439
|
+
#
|
440
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::ListBackupsRequest]
|
441
|
+
# A request object representing the call parameters. Required.
|
442
|
+
# @param options [::Gapic::CallOptions]
|
443
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
444
|
+
#
|
445
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
446
|
+
# @yieldparam result [::Google::Cloud::Redis::Cluster::V1::ListBackupsResponse]
|
447
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
448
|
+
#
|
449
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::ListBackupsResponse]
|
450
|
+
# A result object deserialized from the server's reply
|
451
|
+
def list_backups request_pb, options = nil
|
452
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
453
|
+
|
454
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb
|
455
|
+
query_string_params = if query_string_params.any?
|
456
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
457
|
+
else
|
458
|
+
{}
|
459
|
+
end
|
460
|
+
|
461
|
+
response = @client_stub.make_http_request(
|
462
|
+
verb,
|
463
|
+
uri: uri,
|
464
|
+
body: body || "",
|
465
|
+
params: query_string_params,
|
466
|
+
method_name: "list_backups",
|
467
|
+
options: options
|
468
|
+
)
|
469
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
470
|
+
result = ::Google::Cloud::Redis::Cluster::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true
|
471
|
+
catch :response do
|
472
|
+
yield result, operation if block_given?
|
473
|
+
result
|
474
|
+
end
|
475
|
+
end
|
476
|
+
|
477
|
+
##
|
478
|
+
# Baseline implementation for the get_backup REST call
|
479
|
+
#
|
480
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::GetBackupRequest]
|
481
|
+
# A request object representing the call parameters. Required.
|
482
|
+
# @param options [::Gapic::CallOptions]
|
483
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
484
|
+
#
|
485
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
486
|
+
# @yieldparam result [::Google::Cloud::Redis::Cluster::V1::Backup]
|
487
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
488
|
+
#
|
489
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::Backup]
|
490
|
+
# A result object deserialized from the server's reply
|
491
|
+
def get_backup request_pb, options = nil
|
492
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
493
|
+
|
494
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb
|
495
|
+
query_string_params = if query_string_params.any?
|
496
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
497
|
+
else
|
498
|
+
{}
|
499
|
+
end
|
500
|
+
|
501
|
+
response = @client_stub.make_http_request(
|
502
|
+
verb,
|
503
|
+
uri: uri,
|
504
|
+
body: body || "",
|
505
|
+
params: query_string_params,
|
506
|
+
method_name: "get_backup",
|
507
|
+
options: options
|
508
|
+
)
|
509
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
510
|
+
result = ::Google::Cloud::Redis::Cluster::V1::Backup.decode_json response.body, ignore_unknown_fields: true
|
511
|
+
catch :response do
|
512
|
+
yield result, operation if block_given?
|
513
|
+
result
|
514
|
+
end
|
515
|
+
end
|
516
|
+
|
517
|
+
##
|
518
|
+
# Baseline implementation for the delete_backup REST call
|
519
|
+
#
|
520
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest]
|
521
|
+
# A request object representing the call parameters. Required.
|
522
|
+
# @param options [::Gapic::CallOptions]
|
523
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
524
|
+
#
|
525
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
526
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
527
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
528
|
+
#
|
529
|
+
# @return [::Google::Longrunning::Operation]
|
530
|
+
# A result object deserialized from the server's reply
|
531
|
+
def delete_backup request_pb, options = nil
|
532
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
533
|
+
|
534
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb
|
535
|
+
query_string_params = if query_string_params.any?
|
536
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
537
|
+
else
|
538
|
+
{}
|
539
|
+
end
|
540
|
+
|
541
|
+
response = @client_stub.make_http_request(
|
542
|
+
verb,
|
543
|
+
uri: uri,
|
544
|
+
body: body || "",
|
545
|
+
params: query_string_params,
|
546
|
+
method_name: "delete_backup",
|
547
|
+
options: options
|
548
|
+
)
|
549
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
550
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
551
|
+
catch :response do
|
552
|
+
yield result, operation if block_given?
|
553
|
+
result
|
554
|
+
end
|
555
|
+
end
|
556
|
+
|
557
|
+
##
|
558
|
+
# Baseline implementation for the export_backup REST call
|
559
|
+
#
|
560
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::ExportBackupRequest]
|
561
|
+
# A request object representing the call parameters. Required.
|
562
|
+
# @param options [::Gapic::CallOptions]
|
563
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
564
|
+
#
|
565
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
566
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
567
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
568
|
+
#
|
569
|
+
# @return [::Google::Longrunning::Operation]
|
570
|
+
# A result object deserialized from the server's reply
|
571
|
+
def export_backup request_pb, options = nil
|
572
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
573
|
+
|
574
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_export_backup_request request_pb
|
575
|
+
query_string_params = if query_string_params.any?
|
576
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
577
|
+
else
|
578
|
+
{}
|
579
|
+
end
|
288
580
|
|
289
|
-
|
290
|
-
|
581
|
+
response = @client_stub.make_http_request(
|
582
|
+
verb,
|
583
|
+
uri: uri,
|
584
|
+
body: body || "",
|
585
|
+
params: query_string_params,
|
586
|
+
method_name: "export_backup",
|
587
|
+
options: options
|
588
|
+
)
|
589
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
590
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
591
|
+
catch :response do
|
592
|
+
yield result, operation if block_given?
|
593
|
+
result
|
594
|
+
end
|
595
|
+
end
|
596
|
+
|
597
|
+
##
|
598
|
+
# Baseline implementation for the backup_cluster REST call
|
599
|
+
#
|
600
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::BackupClusterRequest]
|
601
|
+
# A request object representing the call parameters. Required.
|
602
|
+
# @param options [::Gapic::CallOptions]
|
603
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
604
|
+
#
|
605
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
606
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
607
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
608
|
+
#
|
609
|
+
# @return [::Google::Longrunning::Operation]
|
610
|
+
# A result object deserialized from the server's reply
|
611
|
+
def backup_cluster request_pb, options = nil
|
612
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
613
|
+
|
614
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_backup_cluster_request request_pb
|
615
|
+
query_string_params = if query_string_params.any?
|
616
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
617
|
+
else
|
618
|
+
{}
|
619
|
+
end
|
620
|
+
|
621
|
+
response = @client_stub.make_http_request(
|
622
|
+
verb,
|
623
|
+
uri: uri,
|
624
|
+
body: body || "",
|
625
|
+
params: query_string_params,
|
626
|
+
method_name: "backup_cluster",
|
627
|
+
options: options
|
628
|
+
)
|
629
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
630
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
631
|
+
catch :response do
|
632
|
+
yield result, operation if block_given?
|
633
|
+
result
|
634
|
+
end
|
291
635
|
end
|
292
636
|
|
293
637
|
##
|
@@ -417,6 +761,177 @@ module Google
|
|
417
761
|
)
|
418
762
|
transcoder.transcode request_pb
|
419
763
|
end
|
764
|
+
|
765
|
+
##
|
766
|
+
# @private
|
767
|
+
#
|
768
|
+
# GRPC transcoding helper method for the reschedule_cluster_maintenance REST call
|
769
|
+
#
|
770
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest]
|
771
|
+
# A request object representing the call parameters. Required.
|
772
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
773
|
+
# Uri, Body, Query string parameters
|
774
|
+
def self.transcode_reschedule_cluster_maintenance_request request_pb
|
775
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
776
|
+
.with_bindings(
|
777
|
+
uri_method: :post,
|
778
|
+
uri_template: "/v1/{name}:rescheduleClusterMaintenance",
|
779
|
+
body: "*",
|
780
|
+
matches: [
|
781
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
782
|
+
]
|
783
|
+
)
|
784
|
+
transcoder.transcode request_pb
|
785
|
+
end
|
786
|
+
|
787
|
+
##
|
788
|
+
# @private
|
789
|
+
#
|
790
|
+
# GRPC transcoding helper method for the list_backup_collections REST call
|
791
|
+
#
|
792
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest]
|
793
|
+
# A request object representing the call parameters. Required.
|
794
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
795
|
+
# Uri, Body, Query string parameters
|
796
|
+
def self.transcode_list_backup_collections_request request_pb
|
797
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
798
|
+
.with_bindings(
|
799
|
+
uri_method: :get,
|
800
|
+
uri_template: "/v1/{parent}/backupCollections",
|
801
|
+
matches: [
|
802
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
803
|
+
]
|
804
|
+
)
|
805
|
+
transcoder.transcode request_pb
|
806
|
+
end
|
807
|
+
|
808
|
+
##
|
809
|
+
# @private
|
810
|
+
#
|
811
|
+
# GRPC transcoding helper method for the get_backup_collection REST call
|
812
|
+
#
|
813
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest]
|
814
|
+
# A request object representing the call parameters. Required.
|
815
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
816
|
+
# Uri, Body, Query string parameters
|
817
|
+
def self.transcode_get_backup_collection_request request_pb
|
818
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
819
|
+
.with_bindings(
|
820
|
+
uri_method: :get,
|
821
|
+
uri_template: "/v1/{name}",
|
822
|
+
matches: [
|
823
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/?$}, false]
|
824
|
+
]
|
825
|
+
)
|
826
|
+
transcoder.transcode request_pb
|
827
|
+
end
|
828
|
+
|
829
|
+
##
|
830
|
+
# @private
|
831
|
+
#
|
832
|
+
# GRPC transcoding helper method for the list_backups REST call
|
833
|
+
#
|
834
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::ListBackupsRequest]
|
835
|
+
# A request object representing the call parameters. Required.
|
836
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
837
|
+
# Uri, Body, Query string parameters
|
838
|
+
def self.transcode_list_backups_request request_pb
|
839
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
840
|
+
.with_bindings(
|
841
|
+
uri_method: :get,
|
842
|
+
uri_template: "/v1/{parent}/backups",
|
843
|
+
matches: [
|
844
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/?$}, false]
|
845
|
+
]
|
846
|
+
)
|
847
|
+
transcoder.transcode request_pb
|
848
|
+
end
|
849
|
+
|
850
|
+
##
|
851
|
+
# @private
|
852
|
+
#
|
853
|
+
# GRPC transcoding helper method for the get_backup REST call
|
854
|
+
#
|
855
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::GetBackupRequest]
|
856
|
+
# A request object representing the call parameters. Required.
|
857
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
858
|
+
# Uri, Body, Query string parameters
|
859
|
+
def self.transcode_get_backup_request request_pb
|
860
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
861
|
+
.with_bindings(
|
862
|
+
uri_method: :get,
|
863
|
+
uri_template: "/v1/{name}",
|
864
|
+
matches: [
|
865
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false]
|
866
|
+
]
|
867
|
+
)
|
868
|
+
transcoder.transcode request_pb
|
869
|
+
end
|
870
|
+
|
871
|
+
##
|
872
|
+
# @private
|
873
|
+
#
|
874
|
+
# GRPC transcoding helper method for the delete_backup REST call
|
875
|
+
#
|
876
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest]
|
877
|
+
# A request object representing the call parameters. Required.
|
878
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
879
|
+
# Uri, Body, Query string parameters
|
880
|
+
def self.transcode_delete_backup_request request_pb
|
881
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
882
|
+
.with_bindings(
|
883
|
+
uri_method: :delete,
|
884
|
+
uri_template: "/v1/{name}",
|
885
|
+
matches: [
|
886
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false]
|
887
|
+
]
|
888
|
+
)
|
889
|
+
transcoder.transcode request_pb
|
890
|
+
end
|
891
|
+
|
892
|
+
##
|
893
|
+
# @private
|
894
|
+
#
|
895
|
+
# GRPC transcoding helper method for the export_backup REST call
|
896
|
+
#
|
897
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::ExportBackupRequest]
|
898
|
+
# A request object representing the call parameters. Required.
|
899
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
900
|
+
# Uri, Body, Query string parameters
|
901
|
+
def self.transcode_export_backup_request request_pb
|
902
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
903
|
+
.with_bindings(
|
904
|
+
uri_method: :post,
|
905
|
+
uri_template: "/v1/{name}:export",
|
906
|
+
body: "*",
|
907
|
+
matches: [
|
908
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false]
|
909
|
+
]
|
910
|
+
)
|
911
|
+
transcoder.transcode request_pb
|
912
|
+
end
|
913
|
+
|
914
|
+
##
|
915
|
+
# @private
|
916
|
+
#
|
917
|
+
# GRPC transcoding helper method for the backup_cluster REST call
|
918
|
+
#
|
919
|
+
# @param request_pb [::Google::Cloud::Redis::Cluster::V1::BackupClusterRequest]
|
920
|
+
# A request object representing the call parameters. Required.
|
921
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
922
|
+
# Uri, Body, Query string parameters
|
923
|
+
def self.transcode_backup_cluster_request request_pb
|
924
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
925
|
+
.with_bindings(
|
926
|
+
uri_method: :post,
|
927
|
+
uri_template: "/v1/{name}:backup",
|
928
|
+
body: "*",
|
929
|
+
matches: [
|
930
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
931
|
+
]
|
932
|
+
)
|
933
|
+
transcoder.transcode request_pb
|
934
|
+
end
|
420
935
|
end
|
421
936
|
end
|
422
937
|
end
|