google-cloud-backupdr-v1 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/backupdr/v1/backupdr/client.rb +2850 -156
- data/lib/google/cloud/backupdr/v1/backupdr/operations.rb +12 -15
- data/lib/google/cloud/backupdr/v1/backupdr/paths.rb +101 -0
- data/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +2676 -156
- data/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb +43 -38
- data/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +1514 -83
- data/lib/google/cloud/backupdr/v1/backupdr_pb.rb +5 -1
- data/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +48 -0
- data/lib/google/cloud/backupdr/v1/backupplan_pb.rb +62 -0
- data/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb +59 -0
- data/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb +46 -0
- data/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb +87 -0
- data/lib/google/cloud/backupdr/v1/backupvault_pb.rb +99 -0
- data/lib/google/cloud/backupdr/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/backupdr/v1/backupdr.rb +11 -10
- data/proto_docs/google/cloud/backupdr/v1/backupplan.rb +414 -0
- data/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +272 -0
- data/proto_docs/google/cloud/backupdr/v1/backupvault.rb +1103 -0
- data/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb +47 -0
- data/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb +993 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/month.rb +64 -0
- metadata +18 -5
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the list_management_servers REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "list_management_servers",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_management_server",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::BackupDR::V1::ManagementServer.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "create_management_server",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,98 +219,1511 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_management_server",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Baseline implementation for the create_backup_vault REST call
|
238
|
+
#
|
239
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest]
|
240
|
+
# A request object representing the call parameters. Required.
|
241
|
+
# @param options [::Gapic::CallOptions]
|
242
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
243
|
+
#
|
244
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
245
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
246
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
247
|
+
#
|
248
|
+
# @return [::Google::Longrunning::Operation]
|
249
|
+
# A result object deserialized from the server's reply
|
250
|
+
def create_backup_vault request_pb, options = nil
|
251
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
211
252
|
|
212
|
-
|
213
|
-
|
253
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb
|
254
|
+
query_string_params = if query_string_params.any?
|
255
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
256
|
+
else
|
257
|
+
{}
|
258
|
+
end
|
259
|
+
|
260
|
+
response = @client_stub.make_http_request(
|
261
|
+
verb,
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "create_backup_vault",
|
266
|
+
options: options
|
267
|
+
)
|
268
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
269
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
214
274
|
end
|
215
275
|
|
216
276
|
##
|
217
|
-
#
|
277
|
+
# Baseline implementation for the list_backup_vaults REST call
|
218
278
|
#
|
219
|
-
#
|
279
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest]
|
280
|
+
# A request object representing the call parameters. Required.
|
281
|
+
# @param options [::Gapic::CallOptions]
|
282
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
220
283
|
#
|
221
|
-
# @
|
284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
285
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse]
|
286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
287
|
+
#
|
288
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse]
|
289
|
+
# A result object deserialized from the server's reply
|
290
|
+
def list_backup_vaults request_pb, options = nil
|
291
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
292
|
+
|
293
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb
|
294
|
+
query_string_params = if query_string_params.any?
|
295
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
296
|
+
else
|
297
|
+
{}
|
298
|
+
end
|
299
|
+
|
300
|
+
response = @client_stub.make_http_request(
|
301
|
+
verb,
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "list_backup_vaults",
|
306
|
+
options: options
|
307
|
+
)
|
308
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
309
|
+
result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
##
|
317
|
+
# Baseline implementation for the fetch_usable_backup_vaults REST call
|
318
|
+
#
|
319
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest]
|
222
320
|
# A request object representing the call parameters. Required.
|
223
|
-
# @
|
224
|
-
#
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
321
|
+
# @param options [::Gapic::CallOptions]
|
322
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
323
|
+
#
|
324
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
325
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse]
|
326
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
327
|
+
#
|
328
|
+
# @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse]
|
329
|
+
# A result object deserialized from the server's reply
|
330
|
+
def fetch_usable_backup_vaults request_pb, options = nil
|
331
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
332
|
+
|
333
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb
|
334
|
+
query_string_params = if query_string_params.any?
|
335
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
336
|
+
else
|
337
|
+
{}
|
338
|
+
end
|
339
|
+
|
340
|
+
response = @client_stub.make_http_request(
|
341
|
+
verb,
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "fetch_usable_backup_vaults",
|
346
|
+
options: options
|
347
|
+
)
|
348
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
349
|
+
result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
235
354
|
end
|
236
355
|
|
237
356
|
##
|
238
|
-
#
|
357
|
+
# Baseline implementation for the get_backup_vault REST call
|
239
358
|
#
|
240
|
-
#
|
359
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest]
|
360
|
+
# A request object representing the call parameters. Required.
|
361
|
+
# @param options [::Gapic::CallOptions]
|
362
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
241
363
|
#
|
242
|
-
# @
|
364
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
365
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault]
|
366
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
367
|
+
#
|
368
|
+
# @return [::Google::Cloud::BackupDR::V1::BackupVault]
|
369
|
+
# A result object deserialized from the server's reply
|
370
|
+
def get_backup_vault request_pb, options = nil
|
371
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
372
|
+
|
373
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb
|
374
|
+
query_string_params = if query_string_params.any?
|
375
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
376
|
+
else
|
377
|
+
{}
|
378
|
+
end
|
379
|
+
|
380
|
+
response = @client_stub.make_http_request(
|
381
|
+
verb,
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "get_backup_vault",
|
386
|
+
options: options
|
387
|
+
)
|
388
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
389
|
+
result = ::Google::Cloud::BackupDR::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
##
|
397
|
+
# Baseline implementation for the update_backup_vault REST call
|
398
|
+
#
|
399
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest]
|
243
400
|
# A request object representing the call parameters. Required.
|
244
|
-
# @
|
245
|
-
#
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
401
|
+
# @param options [::Gapic::CallOptions]
|
402
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
403
|
+
#
|
404
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
405
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
406
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
407
|
+
#
|
408
|
+
# @return [::Google::Longrunning::Operation]
|
409
|
+
# A result object deserialized from the server's reply
|
410
|
+
def update_backup_vault request_pb, options = nil
|
411
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
412
|
+
|
413
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb
|
414
|
+
query_string_params = if query_string_params.any?
|
415
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
416
|
+
else
|
417
|
+
{}
|
418
|
+
end
|
419
|
+
|
420
|
+
response = @client_stub.make_http_request(
|
421
|
+
verb,
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "update_backup_vault",
|
426
|
+
options: options
|
427
|
+
)
|
428
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
429
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
256
434
|
end
|
257
435
|
|
258
436
|
##
|
259
|
-
#
|
437
|
+
# Baseline implementation for the delete_backup_vault REST call
|
260
438
|
#
|
261
|
-
#
|
439
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest]
|
440
|
+
# A request object representing the call parameters. Required.
|
441
|
+
# @param options [::Gapic::CallOptions]
|
442
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
262
443
|
#
|
263
|
-
# @
|
444
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
445
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
446
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
447
|
+
#
|
448
|
+
# @return [::Google::Longrunning::Operation]
|
449
|
+
# A result object deserialized from the server's reply
|
450
|
+
def delete_backup_vault request_pb, options = nil
|
451
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
452
|
+
|
453
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb
|
454
|
+
query_string_params = if query_string_params.any?
|
455
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
456
|
+
else
|
457
|
+
{}
|
458
|
+
end
|
459
|
+
|
460
|
+
response = @client_stub.make_http_request(
|
461
|
+
verb,
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "delete_backup_vault",
|
466
|
+
options: options
|
467
|
+
)
|
468
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
469
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
476
|
+
##
|
477
|
+
# Baseline implementation for the list_data_sources REST call
|
478
|
+
#
|
479
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest]
|
264
480
|
# A request object representing the call parameters. Required.
|
265
|
-
# @
|
266
|
-
#
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
481
|
+
# @param options [::Gapic::CallOptions]
|
482
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
483
|
+
#
|
484
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
485
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse]
|
486
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
487
|
+
#
|
488
|
+
# @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse]
|
489
|
+
# A result object deserialized from the server's reply
|
490
|
+
def list_data_sources request_pb, options = nil
|
491
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
492
|
+
|
493
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb
|
494
|
+
query_string_params = if query_string_params.any?
|
495
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
496
|
+
else
|
497
|
+
{}
|
498
|
+
end
|
499
|
+
|
500
|
+
response = @client_stub.make_http_request(
|
501
|
+
verb,
|
502
|
+
uri: uri,
|
503
|
+
body: body || "",
|
504
|
+
params: query_string_params,
|
505
|
+
method_name: "list_data_sources",
|
506
|
+
options: options
|
507
|
+
)
|
508
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
509
|
+
result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true
|
510
|
+
catch :response do
|
511
|
+
yield result, operation if block_given?
|
512
|
+
result
|
513
|
+
end
|
278
514
|
end
|
279
515
|
|
280
516
|
##
|
281
|
-
#
|
517
|
+
# Baseline implementation for the get_data_source REST call
|
282
518
|
#
|
283
|
-
#
|
519
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest]
|
520
|
+
# A request object representing the call parameters. Required.
|
521
|
+
# @param options [::Gapic::CallOptions]
|
522
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
284
523
|
#
|
285
|
-
# @
|
524
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
525
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource]
|
526
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
527
|
+
#
|
528
|
+
# @return [::Google::Cloud::BackupDR::V1::DataSource]
|
529
|
+
# A result object deserialized from the server's reply
|
530
|
+
def get_data_source request_pb, options = nil
|
531
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
532
|
+
|
533
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb
|
534
|
+
query_string_params = if query_string_params.any?
|
535
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
536
|
+
else
|
537
|
+
{}
|
538
|
+
end
|
539
|
+
|
540
|
+
response = @client_stub.make_http_request(
|
541
|
+
verb,
|
542
|
+
uri: uri,
|
543
|
+
body: body || "",
|
544
|
+
params: query_string_params,
|
545
|
+
method_name: "get_data_source",
|
546
|
+
options: options
|
547
|
+
)
|
548
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
549
|
+
result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true
|
550
|
+
catch :response do
|
551
|
+
yield result, operation if block_given?
|
552
|
+
result
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
556
|
+
##
|
557
|
+
# Baseline implementation for the update_data_source REST call
|
558
|
+
#
|
559
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest]
|
286
560
|
# A request object representing the call parameters. Required.
|
287
|
-
# @
|
288
|
-
#
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
561
|
+
# @param options [::Gapic::CallOptions]
|
562
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
563
|
+
#
|
564
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
565
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
566
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
567
|
+
#
|
568
|
+
# @return [::Google::Longrunning::Operation]
|
569
|
+
# A result object deserialized from the server's reply
|
570
|
+
def update_data_source request_pb, options = nil
|
571
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
572
|
+
|
573
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb
|
574
|
+
query_string_params = if query_string_params.any?
|
575
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
576
|
+
else
|
577
|
+
{}
|
578
|
+
end
|
579
|
+
|
580
|
+
response = @client_stub.make_http_request(
|
581
|
+
verb,
|
582
|
+
uri: uri,
|
583
|
+
body: body || "",
|
584
|
+
params: query_string_params,
|
585
|
+
method_name: "update_data_source",
|
586
|
+
options: options
|
587
|
+
)
|
588
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
589
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
590
|
+
catch :response do
|
591
|
+
yield result, operation if block_given?
|
592
|
+
result
|
593
|
+
end
|
594
|
+
end
|
595
|
+
|
596
|
+
##
|
597
|
+
# Baseline implementation for the list_backups REST call
|
598
|
+
#
|
599
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest]
|
600
|
+
# A request object representing the call parameters. Required.
|
601
|
+
# @param options [::Gapic::CallOptions]
|
602
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
603
|
+
#
|
604
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
605
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupsResponse]
|
606
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
607
|
+
#
|
608
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupsResponse]
|
609
|
+
# A result object deserialized from the server's reply
|
610
|
+
def list_backups request_pb, options = nil
|
611
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
612
|
+
|
613
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb
|
614
|
+
query_string_params = if query_string_params.any?
|
615
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
616
|
+
else
|
617
|
+
{}
|
618
|
+
end
|
619
|
+
|
620
|
+
response = @client_stub.make_http_request(
|
621
|
+
verb,
|
622
|
+
uri: uri,
|
623
|
+
body: body || "",
|
624
|
+
params: query_string_params,
|
625
|
+
method_name: "list_backups",
|
626
|
+
options: options
|
627
|
+
)
|
628
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
629
|
+
result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true
|
630
|
+
catch :response do
|
631
|
+
yield result, operation if block_given?
|
632
|
+
result
|
633
|
+
end
|
634
|
+
end
|
635
|
+
|
636
|
+
##
|
637
|
+
# Baseline implementation for the get_backup REST call
|
638
|
+
#
|
639
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest]
|
640
|
+
# A request object representing the call parameters. Required.
|
641
|
+
# @param options [::Gapic::CallOptions]
|
642
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
643
|
+
#
|
644
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
645
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::Backup]
|
646
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
647
|
+
#
|
648
|
+
# @return [::Google::Cloud::BackupDR::V1::Backup]
|
649
|
+
# A result object deserialized from the server's reply
|
650
|
+
def get_backup request_pb, options = nil
|
651
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
652
|
+
|
653
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb
|
654
|
+
query_string_params = if query_string_params.any?
|
655
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
656
|
+
else
|
657
|
+
{}
|
658
|
+
end
|
659
|
+
|
660
|
+
response = @client_stub.make_http_request(
|
661
|
+
verb,
|
662
|
+
uri: uri,
|
663
|
+
body: body || "",
|
664
|
+
params: query_string_params,
|
665
|
+
method_name: "get_backup",
|
666
|
+
options: options
|
667
|
+
)
|
668
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
669
|
+
result = ::Google::Cloud::BackupDR::V1::Backup.decode_json response.body, ignore_unknown_fields: true
|
670
|
+
catch :response do
|
671
|
+
yield result, operation if block_given?
|
672
|
+
result
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
676
|
+
##
|
677
|
+
# Baseline implementation for the update_backup REST call
|
678
|
+
#
|
679
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest]
|
680
|
+
# A request object representing the call parameters. Required.
|
681
|
+
# @param options [::Gapic::CallOptions]
|
682
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
683
|
+
#
|
684
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
685
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
686
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
687
|
+
#
|
688
|
+
# @return [::Google::Longrunning::Operation]
|
689
|
+
# A result object deserialized from the server's reply
|
690
|
+
def update_backup request_pb, options = nil
|
691
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
692
|
+
|
693
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb
|
694
|
+
query_string_params = if query_string_params.any?
|
695
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
696
|
+
else
|
697
|
+
{}
|
698
|
+
end
|
699
|
+
|
700
|
+
response = @client_stub.make_http_request(
|
701
|
+
verb,
|
702
|
+
uri: uri,
|
703
|
+
body: body || "",
|
704
|
+
params: query_string_params,
|
705
|
+
method_name: "update_backup",
|
706
|
+
options: options
|
707
|
+
)
|
708
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
709
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
710
|
+
catch :response do
|
711
|
+
yield result, operation if block_given?
|
712
|
+
result
|
713
|
+
end
|
714
|
+
end
|
715
|
+
|
716
|
+
##
|
717
|
+
# Baseline implementation for the delete_backup REST call
|
718
|
+
#
|
719
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest]
|
720
|
+
# A request object representing the call parameters. Required.
|
721
|
+
# @param options [::Gapic::CallOptions]
|
722
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
723
|
+
#
|
724
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
725
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
726
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
727
|
+
#
|
728
|
+
# @return [::Google::Longrunning::Operation]
|
729
|
+
# A result object deserialized from the server's reply
|
730
|
+
def delete_backup request_pb, options = nil
|
731
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
732
|
+
|
733
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb
|
734
|
+
query_string_params = if query_string_params.any?
|
735
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
736
|
+
else
|
737
|
+
{}
|
738
|
+
end
|
739
|
+
|
740
|
+
response = @client_stub.make_http_request(
|
741
|
+
verb,
|
742
|
+
uri: uri,
|
743
|
+
body: body || "",
|
744
|
+
params: query_string_params,
|
745
|
+
method_name: "delete_backup",
|
746
|
+
options: options
|
747
|
+
)
|
748
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
749
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
750
|
+
catch :response do
|
751
|
+
yield result, operation if block_given?
|
752
|
+
result
|
753
|
+
end
|
754
|
+
end
|
755
|
+
|
756
|
+
##
|
757
|
+
# Baseline implementation for the restore_backup REST call
|
758
|
+
#
|
759
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest]
|
760
|
+
# A request object representing the call parameters. Required.
|
761
|
+
# @param options [::Gapic::CallOptions]
|
762
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
763
|
+
#
|
764
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
765
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
766
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
767
|
+
#
|
768
|
+
# @return [::Google::Longrunning::Operation]
|
769
|
+
# A result object deserialized from the server's reply
|
770
|
+
def restore_backup request_pb, options = nil
|
771
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
772
|
+
|
773
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_restore_backup_request request_pb
|
774
|
+
query_string_params = if query_string_params.any?
|
775
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
776
|
+
else
|
777
|
+
{}
|
778
|
+
end
|
779
|
+
|
780
|
+
response = @client_stub.make_http_request(
|
781
|
+
verb,
|
782
|
+
uri: uri,
|
783
|
+
body: body || "",
|
784
|
+
params: query_string_params,
|
785
|
+
method_name: "restore_backup",
|
786
|
+
options: options
|
787
|
+
)
|
788
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
789
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
790
|
+
catch :response do
|
791
|
+
yield result, operation if block_given?
|
792
|
+
result
|
793
|
+
end
|
794
|
+
end
|
795
|
+
|
796
|
+
##
|
797
|
+
# Baseline implementation for the create_backup_plan REST call
|
798
|
+
#
|
799
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest]
|
800
|
+
# A request object representing the call parameters. Required.
|
801
|
+
# @param options [::Gapic::CallOptions]
|
802
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
803
|
+
#
|
804
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
805
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
806
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
807
|
+
#
|
808
|
+
# @return [::Google::Longrunning::Operation]
|
809
|
+
# A result object deserialized from the server's reply
|
810
|
+
def create_backup_plan request_pb, options = nil
|
811
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
812
|
+
|
813
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb
|
814
|
+
query_string_params = if query_string_params.any?
|
815
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
816
|
+
else
|
817
|
+
{}
|
818
|
+
end
|
819
|
+
|
820
|
+
response = @client_stub.make_http_request(
|
821
|
+
verb,
|
822
|
+
uri: uri,
|
823
|
+
body: body || "",
|
824
|
+
params: query_string_params,
|
825
|
+
method_name: "create_backup_plan",
|
826
|
+
options: options
|
827
|
+
)
|
828
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
829
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
830
|
+
catch :response do
|
831
|
+
yield result, operation if block_given?
|
832
|
+
result
|
833
|
+
end
|
834
|
+
end
|
835
|
+
|
836
|
+
##
|
837
|
+
# Baseline implementation for the get_backup_plan REST call
|
838
|
+
#
|
839
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest]
|
840
|
+
# A request object representing the call parameters. Required.
|
841
|
+
# @param options [::Gapic::CallOptions]
|
842
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
843
|
+
#
|
844
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
845
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan]
|
846
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
847
|
+
#
|
848
|
+
# @return [::Google::Cloud::BackupDR::V1::BackupPlan]
|
849
|
+
# A result object deserialized from the server's reply
|
850
|
+
def get_backup_plan request_pb, options = nil
|
851
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
852
|
+
|
853
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb
|
854
|
+
query_string_params = if query_string_params.any?
|
855
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
856
|
+
else
|
857
|
+
{}
|
858
|
+
end
|
859
|
+
|
860
|
+
response = @client_stub.make_http_request(
|
861
|
+
verb,
|
862
|
+
uri: uri,
|
863
|
+
body: body || "",
|
864
|
+
params: query_string_params,
|
865
|
+
method_name: "get_backup_plan",
|
866
|
+
options: options
|
867
|
+
)
|
868
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
869
|
+
result = ::Google::Cloud::BackupDR::V1::BackupPlan.decode_json response.body, ignore_unknown_fields: true
|
870
|
+
catch :response do
|
871
|
+
yield result, operation if block_given?
|
872
|
+
result
|
873
|
+
end
|
874
|
+
end
|
875
|
+
|
876
|
+
##
|
877
|
+
# Baseline implementation for the list_backup_plans REST call
|
878
|
+
#
|
879
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest]
|
880
|
+
# A request object representing the call parameters. Required.
|
881
|
+
# @param options [::Gapic::CallOptions]
|
882
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
883
|
+
#
|
884
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
885
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse]
|
886
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
887
|
+
#
|
888
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse]
|
889
|
+
# A result object deserialized from the server's reply
|
890
|
+
def list_backup_plans request_pb, options = nil
|
891
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
892
|
+
|
893
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb
|
894
|
+
query_string_params = if query_string_params.any?
|
895
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
896
|
+
else
|
897
|
+
{}
|
898
|
+
end
|
899
|
+
|
900
|
+
response = @client_stub.make_http_request(
|
901
|
+
verb,
|
902
|
+
uri: uri,
|
903
|
+
body: body || "",
|
904
|
+
params: query_string_params,
|
905
|
+
method_name: "list_backup_plans",
|
906
|
+
options: options
|
907
|
+
)
|
908
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
909
|
+
result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.decode_json response.body, ignore_unknown_fields: true
|
910
|
+
catch :response do
|
911
|
+
yield result, operation if block_given?
|
912
|
+
result
|
913
|
+
end
|
914
|
+
end
|
915
|
+
|
916
|
+
##
|
917
|
+
# Baseline implementation for the delete_backup_plan REST call
|
918
|
+
#
|
919
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest]
|
920
|
+
# A request object representing the call parameters. Required.
|
921
|
+
# @param options [::Gapic::CallOptions]
|
922
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
923
|
+
#
|
924
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
925
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
926
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
927
|
+
#
|
928
|
+
# @return [::Google::Longrunning::Operation]
|
929
|
+
# A result object deserialized from the server's reply
|
930
|
+
def delete_backup_plan request_pb, options = nil
|
931
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
932
|
+
|
933
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb
|
934
|
+
query_string_params = if query_string_params.any?
|
935
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
936
|
+
else
|
937
|
+
{}
|
938
|
+
end
|
939
|
+
|
940
|
+
response = @client_stub.make_http_request(
|
941
|
+
verb,
|
942
|
+
uri: uri,
|
943
|
+
body: body || "",
|
944
|
+
params: query_string_params,
|
945
|
+
method_name: "delete_backup_plan",
|
946
|
+
options: options
|
947
|
+
)
|
948
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
949
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
950
|
+
catch :response do
|
951
|
+
yield result, operation if block_given?
|
952
|
+
result
|
953
|
+
end
|
954
|
+
end
|
955
|
+
|
956
|
+
##
|
957
|
+
# Baseline implementation for the create_backup_plan_association REST call
|
958
|
+
#
|
959
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest]
|
960
|
+
# A request object representing the call parameters. Required.
|
961
|
+
# @param options [::Gapic::CallOptions]
|
962
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
963
|
+
#
|
964
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
965
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
966
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
967
|
+
#
|
968
|
+
# @return [::Google::Longrunning::Operation]
|
969
|
+
# A result object deserialized from the server's reply
|
970
|
+
def create_backup_plan_association request_pb, options = nil
|
971
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
972
|
+
|
973
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb
|
974
|
+
query_string_params = if query_string_params.any?
|
975
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
976
|
+
else
|
977
|
+
{}
|
978
|
+
end
|
979
|
+
|
980
|
+
response = @client_stub.make_http_request(
|
981
|
+
verb,
|
982
|
+
uri: uri,
|
983
|
+
body: body || "",
|
984
|
+
params: query_string_params,
|
985
|
+
method_name: "create_backup_plan_association",
|
986
|
+
options: options
|
987
|
+
)
|
988
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
989
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
990
|
+
catch :response do
|
991
|
+
yield result, operation if block_given?
|
992
|
+
result
|
993
|
+
end
|
994
|
+
end
|
995
|
+
|
996
|
+
##
|
997
|
+
# Baseline implementation for the get_backup_plan_association REST call
|
998
|
+
#
|
999
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest]
|
1000
|
+
# A request object representing the call parameters. Required.
|
1001
|
+
# @param options [::Gapic::CallOptions]
|
1002
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1003
|
+
#
|
1004
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1005
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation]
|
1006
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1007
|
+
#
|
1008
|
+
# @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation]
|
1009
|
+
# A result object deserialized from the server's reply
|
1010
|
+
def get_backup_plan_association request_pb, options = nil
|
1011
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1012
|
+
|
1013
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb
|
1014
|
+
query_string_params = if query_string_params.any?
|
1015
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1016
|
+
else
|
1017
|
+
{}
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
response = @client_stub.make_http_request(
|
1021
|
+
verb,
|
1022
|
+
uri: uri,
|
1023
|
+
body: body || "",
|
1024
|
+
params: query_string_params,
|
1025
|
+
method_name: "get_backup_plan_association",
|
1026
|
+
options: options
|
1027
|
+
)
|
1028
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1029
|
+
result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.decode_json response.body, ignore_unknown_fields: true
|
1030
|
+
catch :response do
|
1031
|
+
yield result, operation if block_given?
|
1032
|
+
result
|
1033
|
+
end
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
##
|
1037
|
+
# Baseline implementation for the list_backup_plan_associations REST call
|
1038
|
+
#
|
1039
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest]
|
1040
|
+
# A request object representing the call parameters. Required.
|
1041
|
+
# @param options [::Gapic::CallOptions]
|
1042
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1043
|
+
#
|
1044
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1045
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse]
|
1046
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1047
|
+
#
|
1048
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse]
|
1049
|
+
# A result object deserialized from the server's reply
|
1050
|
+
def list_backup_plan_associations request_pb, options = nil
|
1051
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1052
|
+
|
1053
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb
|
1054
|
+
query_string_params = if query_string_params.any?
|
1055
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1056
|
+
else
|
1057
|
+
{}
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
response = @client_stub.make_http_request(
|
1061
|
+
verb,
|
1062
|
+
uri: uri,
|
1063
|
+
body: body || "",
|
1064
|
+
params: query_string_params,
|
1065
|
+
method_name: "list_backup_plan_associations",
|
1066
|
+
options: options
|
1067
|
+
)
|
1068
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1069
|
+
result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.decode_json response.body, ignore_unknown_fields: true
|
1070
|
+
catch :response do
|
1071
|
+
yield result, operation if block_given?
|
1072
|
+
result
|
1073
|
+
end
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
##
|
1077
|
+
# Baseline implementation for the delete_backup_plan_association REST call
|
1078
|
+
#
|
1079
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest]
|
1080
|
+
# A request object representing the call parameters. Required.
|
1081
|
+
# @param options [::Gapic::CallOptions]
|
1082
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1083
|
+
#
|
1084
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1085
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
1086
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1087
|
+
#
|
1088
|
+
# @return [::Google::Longrunning::Operation]
|
1089
|
+
# A result object deserialized from the server's reply
|
1090
|
+
def delete_backup_plan_association request_pb, options = nil
|
1091
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1092
|
+
|
1093
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb
|
1094
|
+
query_string_params = if query_string_params.any?
|
1095
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1096
|
+
else
|
1097
|
+
{}
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
response = @client_stub.make_http_request(
|
1101
|
+
verb,
|
1102
|
+
uri: uri,
|
1103
|
+
body: body || "",
|
1104
|
+
params: query_string_params,
|
1105
|
+
method_name: "delete_backup_plan_association",
|
1106
|
+
options: options
|
1107
|
+
)
|
1108
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1109
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
1110
|
+
catch :response do
|
1111
|
+
yield result, operation if block_given?
|
1112
|
+
result
|
1113
|
+
end
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
##
|
1117
|
+
# Baseline implementation for the trigger_backup REST call
|
1118
|
+
#
|
1119
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest]
|
1120
|
+
# A request object representing the call parameters. Required.
|
1121
|
+
# @param options [::Gapic::CallOptions]
|
1122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1123
|
+
#
|
1124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1125
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
1126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1127
|
+
#
|
1128
|
+
# @return [::Google::Longrunning::Operation]
|
1129
|
+
# A result object deserialized from the server's reply
|
1130
|
+
def trigger_backup request_pb, options = nil
|
1131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1132
|
+
|
1133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_trigger_backup_request request_pb
|
1134
|
+
query_string_params = if query_string_params.any?
|
1135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1136
|
+
else
|
1137
|
+
{}
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
response = @client_stub.make_http_request(
|
1141
|
+
verb,
|
1142
|
+
uri: uri,
|
1143
|
+
body: body || "",
|
1144
|
+
params: query_string_params,
|
1145
|
+
method_name: "trigger_backup",
|
1146
|
+
options: options
|
1147
|
+
)
|
1148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1149
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
1150
|
+
catch :response do
|
1151
|
+
yield result, operation if block_given?
|
1152
|
+
result
|
1153
|
+
end
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
##
|
1157
|
+
# @private
|
1158
|
+
#
|
1159
|
+
# GRPC transcoding helper method for the list_management_servers REST call
|
1160
|
+
#
|
1161
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest]
|
1162
|
+
# A request object representing the call parameters. Required.
|
1163
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1164
|
+
# Uri, Body, Query string parameters
|
1165
|
+
def self.transcode_list_management_servers_request request_pb
|
1166
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1167
|
+
.with_bindings(
|
1168
|
+
uri_method: :get,
|
1169
|
+
uri_template: "/v1/{parent}/managementServers",
|
1170
|
+
matches: [
|
1171
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1172
|
+
]
|
1173
|
+
)
|
1174
|
+
transcoder.transcode request_pb
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
##
|
1178
|
+
# @private
|
1179
|
+
#
|
1180
|
+
# GRPC transcoding helper method for the get_management_server REST call
|
1181
|
+
#
|
1182
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest]
|
1183
|
+
# A request object representing the call parameters. Required.
|
1184
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1185
|
+
# Uri, Body, Query string parameters
|
1186
|
+
def self.transcode_get_management_server_request request_pb
|
1187
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1188
|
+
.with_bindings(
|
1189
|
+
uri_method: :get,
|
1190
|
+
uri_template: "/v1/{name}",
|
1191
|
+
matches: [
|
1192
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false]
|
1193
|
+
]
|
1194
|
+
)
|
1195
|
+
transcoder.transcode request_pb
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
##
|
1199
|
+
# @private
|
1200
|
+
#
|
1201
|
+
# GRPC transcoding helper method for the create_management_server REST call
|
1202
|
+
#
|
1203
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest]
|
1204
|
+
# A request object representing the call parameters. Required.
|
1205
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1206
|
+
# Uri, Body, Query string parameters
|
1207
|
+
def self.transcode_create_management_server_request request_pb
|
1208
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1209
|
+
.with_bindings(
|
1210
|
+
uri_method: :post,
|
1211
|
+
uri_template: "/v1/{parent}/managementServers",
|
1212
|
+
body: "management_server",
|
1213
|
+
matches: [
|
1214
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1215
|
+
]
|
1216
|
+
)
|
1217
|
+
transcoder.transcode request_pb
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
##
|
1221
|
+
# @private
|
1222
|
+
#
|
1223
|
+
# GRPC transcoding helper method for the delete_management_server REST call
|
1224
|
+
#
|
1225
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest]
|
1226
|
+
# A request object representing the call parameters. Required.
|
1227
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1228
|
+
# Uri, Body, Query string parameters
|
1229
|
+
def self.transcode_delete_management_server_request request_pb
|
1230
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1231
|
+
.with_bindings(
|
1232
|
+
uri_method: :delete,
|
1233
|
+
uri_template: "/v1/{name}",
|
1234
|
+
matches: [
|
1235
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false]
|
1236
|
+
]
|
1237
|
+
)
|
1238
|
+
transcoder.transcode request_pb
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
##
|
1242
|
+
# @private
|
1243
|
+
#
|
1244
|
+
# GRPC transcoding helper method for the create_backup_vault REST call
|
1245
|
+
#
|
1246
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest]
|
1247
|
+
# A request object representing the call parameters. Required.
|
1248
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1249
|
+
# Uri, Body, Query string parameters
|
1250
|
+
def self.transcode_create_backup_vault_request request_pb
|
1251
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1252
|
+
.with_bindings(
|
1253
|
+
uri_method: :post,
|
1254
|
+
uri_template: "/v1/{parent}/backupVaults",
|
1255
|
+
body: "backup_vault",
|
1256
|
+
matches: [
|
1257
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1258
|
+
]
|
1259
|
+
)
|
1260
|
+
transcoder.transcode request_pb
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
##
|
1264
|
+
# @private
|
1265
|
+
#
|
1266
|
+
# GRPC transcoding helper method for the list_backup_vaults REST call
|
1267
|
+
#
|
1268
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest]
|
1269
|
+
# A request object representing the call parameters. Required.
|
1270
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1271
|
+
# Uri, Body, Query string parameters
|
1272
|
+
def self.transcode_list_backup_vaults_request request_pb
|
1273
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1274
|
+
.with_bindings(
|
1275
|
+
uri_method: :get,
|
1276
|
+
uri_template: "/v1/{parent}/backupVaults",
|
1277
|
+
matches: [
|
1278
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1279
|
+
]
|
1280
|
+
)
|
1281
|
+
transcoder.transcode request_pb
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
##
|
1285
|
+
# @private
|
1286
|
+
#
|
1287
|
+
# GRPC transcoding helper method for the fetch_usable_backup_vaults REST call
|
1288
|
+
#
|
1289
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest]
|
1290
|
+
# A request object representing the call parameters. Required.
|
1291
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1292
|
+
# Uri, Body, Query string parameters
|
1293
|
+
def self.transcode_fetch_usable_backup_vaults_request request_pb
|
1294
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1295
|
+
.with_bindings(
|
1296
|
+
uri_method: :get,
|
1297
|
+
uri_template: "/v1/{parent}/backupVaults:fetchUsable",
|
1298
|
+
matches: [
|
1299
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1300
|
+
]
|
1301
|
+
)
|
1302
|
+
transcoder.transcode request_pb
|
1303
|
+
end
|
1304
|
+
|
1305
|
+
##
|
1306
|
+
# @private
|
1307
|
+
#
|
1308
|
+
# GRPC transcoding helper method for the get_backup_vault REST call
|
1309
|
+
#
|
1310
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest]
|
1311
|
+
# A request object representing the call parameters. Required.
|
1312
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1313
|
+
# Uri, Body, Query string parameters
|
1314
|
+
def self.transcode_get_backup_vault_request request_pb
|
1315
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1316
|
+
.with_bindings(
|
1317
|
+
uri_method: :get,
|
1318
|
+
uri_template: "/v1/{name}",
|
1319
|
+
matches: [
|
1320
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
|
1321
|
+
]
|
1322
|
+
)
|
1323
|
+
transcoder.transcode request_pb
|
1324
|
+
end
|
1325
|
+
|
1326
|
+
##
|
1327
|
+
# @private
|
1328
|
+
#
|
1329
|
+
# GRPC transcoding helper method for the update_backup_vault REST call
|
1330
|
+
#
|
1331
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest]
|
1332
|
+
# A request object representing the call parameters. Required.
|
1333
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1334
|
+
# Uri, Body, Query string parameters
|
1335
|
+
def self.transcode_update_backup_vault_request request_pb
|
1336
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1337
|
+
.with_bindings(
|
1338
|
+
uri_method: :patch,
|
1339
|
+
uri_template: "/v1/{backup_vault.name}",
|
1340
|
+
body: "backup_vault",
|
1341
|
+
matches: [
|
1342
|
+
["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
|
1343
|
+
]
|
1344
|
+
)
|
1345
|
+
transcoder.transcode request_pb
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
##
|
1349
|
+
# @private
|
1350
|
+
#
|
1351
|
+
# GRPC transcoding helper method for the delete_backup_vault REST call
|
1352
|
+
#
|
1353
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest]
|
1354
|
+
# A request object representing the call parameters. Required.
|
1355
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1356
|
+
# Uri, Body, Query string parameters
|
1357
|
+
def self.transcode_delete_backup_vault_request request_pb
|
1358
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1359
|
+
.with_bindings(
|
1360
|
+
uri_method: :delete,
|
1361
|
+
uri_template: "/v1/{name}",
|
1362
|
+
matches: [
|
1363
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
|
1364
|
+
]
|
1365
|
+
)
|
1366
|
+
transcoder.transcode request_pb
|
1367
|
+
end
|
1368
|
+
|
1369
|
+
##
|
1370
|
+
# @private
|
1371
|
+
#
|
1372
|
+
# GRPC transcoding helper method for the list_data_sources REST call
|
1373
|
+
#
|
1374
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest]
|
1375
|
+
# A request object representing the call parameters. Required.
|
1376
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1377
|
+
# Uri, Body, Query string parameters
|
1378
|
+
def self.transcode_list_data_sources_request request_pb
|
1379
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1380
|
+
.with_bindings(
|
1381
|
+
uri_method: :get,
|
1382
|
+
uri_template: "/v1/{parent}/dataSources",
|
1383
|
+
matches: [
|
1384
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
|
1385
|
+
]
|
1386
|
+
)
|
1387
|
+
transcoder.transcode request_pb
|
1388
|
+
end
|
1389
|
+
|
1390
|
+
##
|
1391
|
+
# @private
|
1392
|
+
#
|
1393
|
+
# GRPC transcoding helper method for the get_data_source REST call
|
1394
|
+
#
|
1395
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest]
|
1396
|
+
# A request object representing the call parameters. Required.
|
1397
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1398
|
+
# Uri, Body, Query string parameters
|
1399
|
+
def self.transcode_get_data_source_request request_pb
|
1400
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1401
|
+
.with_bindings(
|
1402
|
+
uri_method: :get,
|
1403
|
+
uri_template: "/v1/{name}",
|
1404
|
+
matches: [
|
1405
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
|
1406
|
+
]
|
1407
|
+
)
|
1408
|
+
transcoder.transcode request_pb
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
##
|
1412
|
+
# @private
|
1413
|
+
#
|
1414
|
+
# GRPC transcoding helper method for the update_data_source REST call
|
1415
|
+
#
|
1416
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest]
|
1417
|
+
# A request object representing the call parameters. Required.
|
1418
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1419
|
+
# Uri, Body, Query string parameters
|
1420
|
+
def self.transcode_update_data_source_request request_pb
|
1421
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1422
|
+
.with_bindings(
|
1423
|
+
uri_method: :patch,
|
1424
|
+
uri_template: "/v1/{data_source.name}",
|
1425
|
+
body: "data_source",
|
1426
|
+
matches: [
|
1427
|
+
["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
|
1428
|
+
]
|
1429
|
+
)
|
1430
|
+
transcoder.transcode request_pb
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
##
|
1434
|
+
# @private
|
1435
|
+
#
|
1436
|
+
# GRPC transcoding helper method for the list_backups REST call
|
1437
|
+
#
|
1438
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest]
|
1439
|
+
# A request object representing the call parameters. Required.
|
1440
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1441
|
+
# Uri, Body, Query string parameters
|
1442
|
+
def self.transcode_list_backups_request request_pb
|
1443
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1444
|
+
.with_bindings(
|
1445
|
+
uri_method: :get,
|
1446
|
+
uri_template: "/v1/{parent}/backups",
|
1447
|
+
matches: [
|
1448
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
|
1449
|
+
]
|
1450
|
+
)
|
1451
|
+
transcoder.transcode request_pb
|
1452
|
+
end
|
1453
|
+
|
1454
|
+
##
|
1455
|
+
# @private
|
1456
|
+
#
|
1457
|
+
# GRPC transcoding helper method for the get_backup REST call
|
1458
|
+
#
|
1459
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest]
|
1460
|
+
# A request object representing the call parameters. Required.
|
1461
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1462
|
+
# Uri, Body, Query string parameters
|
1463
|
+
def self.transcode_get_backup_request request_pb
|
1464
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1465
|
+
.with_bindings(
|
1466
|
+
uri_method: :get,
|
1467
|
+
uri_template: "/v1/{name}",
|
1468
|
+
matches: [
|
1469
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
|
1470
|
+
]
|
1471
|
+
)
|
1472
|
+
transcoder.transcode request_pb
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
##
|
1476
|
+
# @private
|
1477
|
+
#
|
1478
|
+
# GRPC transcoding helper method for the update_backup REST call
|
1479
|
+
#
|
1480
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest]
|
1481
|
+
# A request object representing the call parameters. Required.
|
1482
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1483
|
+
# Uri, Body, Query string parameters
|
1484
|
+
def self.transcode_update_backup_request request_pb
|
1485
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1486
|
+
.with_bindings(
|
1487
|
+
uri_method: :patch,
|
1488
|
+
uri_template: "/v1/{backup.name}",
|
1489
|
+
body: "backup",
|
1490
|
+
matches: [
|
1491
|
+
["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
|
1492
|
+
]
|
1493
|
+
)
|
1494
|
+
transcoder.transcode request_pb
|
1495
|
+
end
|
1496
|
+
|
1497
|
+
##
|
1498
|
+
# @private
|
1499
|
+
#
|
1500
|
+
# GRPC transcoding helper method for the delete_backup REST call
|
1501
|
+
#
|
1502
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest]
|
1503
|
+
# A request object representing the call parameters. Required.
|
1504
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1505
|
+
# Uri, Body, Query string parameters
|
1506
|
+
def self.transcode_delete_backup_request request_pb
|
1507
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1508
|
+
.with_bindings(
|
1509
|
+
uri_method: :delete,
|
1510
|
+
uri_template: "/v1/{name}",
|
1511
|
+
matches: [
|
1512
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
|
1513
|
+
]
|
1514
|
+
)
|
1515
|
+
transcoder.transcode request_pb
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
##
|
1519
|
+
# @private
|
1520
|
+
#
|
1521
|
+
# GRPC transcoding helper method for the restore_backup REST call
|
1522
|
+
#
|
1523
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest]
|
1524
|
+
# A request object representing the call parameters. Required.
|
1525
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1526
|
+
# Uri, Body, Query string parameters
|
1527
|
+
def self.transcode_restore_backup_request request_pb
|
1528
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1529
|
+
.with_bindings(
|
1530
|
+
uri_method: :post,
|
1531
|
+
uri_template: "/v1/{name}:restore",
|
1532
|
+
body: "*",
|
1533
|
+
matches: [
|
1534
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
|
1535
|
+
]
|
1536
|
+
)
|
1537
|
+
transcoder.transcode request_pb
|
1538
|
+
end
|
1539
|
+
|
1540
|
+
##
|
1541
|
+
# @private
|
1542
|
+
#
|
1543
|
+
# GRPC transcoding helper method for the create_backup_plan REST call
|
1544
|
+
#
|
1545
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest]
|
1546
|
+
# A request object representing the call parameters. Required.
|
1547
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1548
|
+
# Uri, Body, Query string parameters
|
1549
|
+
def self.transcode_create_backup_plan_request request_pb
|
1550
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1551
|
+
.with_bindings(
|
1552
|
+
uri_method: :post,
|
1553
|
+
uri_template: "/v1/{parent}/backupPlans",
|
1554
|
+
body: "backup_plan",
|
1555
|
+
matches: [
|
1556
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1557
|
+
]
|
1558
|
+
)
|
1559
|
+
transcoder.transcode request_pb
|
1560
|
+
end
|
1561
|
+
|
1562
|
+
##
|
1563
|
+
# @private
|
1564
|
+
#
|
1565
|
+
# GRPC transcoding helper method for the get_backup_plan REST call
|
1566
|
+
#
|
1567
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest]
|
1568
|
+
# A request object representing the call parameters. Required.
|
1569
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1570
|
+
# Uri, Body, Query string parameters
|
1571
|
+
def self.transcode_get_backup_plan_request request_pb
|
1572
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1573
|
+
.with_bindings(
|
1574
|
+
uri_method: :get,
|
1575
|
+
uri_template: "/v1/{name}",
|
1576
|
+
matches: [
|
1577
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
|
1578
|
+
]
|
1579
|
+
)
|
1580
|
+
transcoder.transcode request_pb
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
##
|
1584
|
+
# @private
|
1585
|
+
#
|
1586
|
+
# GRPC transcoding helper method for the list_backup_plans REST call
|
1587
|
+
#
|
1588
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest]
|
1589
|
+
# A request object representing the call parameters. Required.
|
1590
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1591
|
+
# Uri, Body, Query string parameters
|
1592
|
+
def self.transcode_list_backup_plans_request request_pb
|
1593
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1594
|
+
.with_bindings(
|
1595
|
+
uri_method: :get,
|
1596
|
+
uri_template: "/v1/{parent}/backupPlans",
|
1597
|
+
matches: [
|
1598
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1599
|
+
]
|
1600
|
+
)
|
1601
|
+
transcoder.transcode request_pb
|
1602
|
+
end
|
1603
|
+
|
1604
|
+
##
|
1605
|
+
# @private
|
1606
|
+
#
|
1607
|
+
# GRPC transcoding helper method for the delete_backup_plan REST call
|
1608
|
+
#
|
1609
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest]
|
1610
|
+
# A request object representing the call parameters. Required.
|
1611
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1612
|
+
# Uri, Body, Query string parameters
|
1613
|
+
def self.transcode_delete_backup_plan_request request_pb
|
1614
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1615
|
+
.with_bindings(
|
1616
|
+
uri_method: :delete,
|
1617
|
+
uri_template: "/v1/{name}",
|
1618
|
+
matches: [
|
1619
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
|
1620
|
+
]
|
1621
|
+
)
|
1622
|
+
transcoder.transcode request_pb
|
1623
|
+
end
|
1624
|
+
|
1625
|
+
##
|
1626
|
+
# @private
|
1627
|
+
#
|
1628
|
+
# GRPC transcoding helper method for the create_backup_plan_association REST call
|
1629
|
+
#
|
1630
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest]
|
1631
|
+
# A request object representing the call parameters. Required.
|
1632
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1633
|
+
# Uri, Body, Query string parameters
|
1634
|
+
def self.transcode_create_backup_plan_association_request request_pb
|
1635
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1636
|
+
.with_bindings(
|
1637
|
+
uri_method: :post,
|
1638
|
+
uri_template: "/v1/{parent}/backupPlanAssociations",
|
1639
|
+
body: "backup_plan_association",
|
1640
|
+
matches: [
|
1641
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1642
|
+
]
|
1643
|
+
)
|
1644
|
+
transcoder.transcode request_pb
|
1645
|
+
end
|
1646
|
+
|
1647
|
+
##
|
1648
|
+
# @private
|
1649
|
+
#
|
1650
|
+
# GRPC transcoding helper method for the get_backup_plan_association REST call
|
1651
|
+
#
|
1652
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest]
|
1653
|
+
# A request object representing the call parameters. Required.
|
1654
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1655
|
+
# Uri, Body, Query string parameters
|
1656
|
+
def self.transcode_get_backup_plan_association_request request_pb
|
1657
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1658
|
+
.with_bindings(
|
1659
|
+
uri_method: :get,
|
1660
|
+
uri_template: "/v1/{name}",
|
1661
|
+
matches: [
|
1662
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
|
1663
|
+
]
|
1664
|
+
)
|
1665
|
+
transcoder.transcode request_pb
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
##
|
1669
|
+
# @private
|
1670
|
+
#
|
1671
|
+
# GRPC transcoding helper method for the list_backup_plan_associations REST call
|
1672
|
+
#
|
1673
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest]
|
1674
|
+
# A request object representing the call parameters. Required.
|
1675
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1676
|
+
# Uri, Body, Query string parameters
|
1677
|
+
def self.transcode_list_backup_plan_associations_request request_pb
|
1678
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1679
|
+
.with_bindings(
|
1680
|
+
uri_method: :get,
|
1681
|
+
uri_template: "/v1/{parent}/backupPlanAssociations",
|
1682
|
+
matches: [
|
1683
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1684
|
+
]
|
1685
|
+
)
|
1686
|
+
transcoder.transcode request_pb
|
1687
|
+
end
|
1688
|
+
|
1689
|
+
##
|
1690
|
+
# @private
|
1691
|
+
#
|
1692
|
+
# GRPC transcoding helper method for the delete_backup_plan_association REST call
|
1693
|
+
#
|
1694
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest]
|
1695
|
+
# A request object representing the call parameters. Required.
|
1696
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1697
|
+
# Uri, Body, Query string parameters
|
1698
|
+
def self.transcode_delete_backup_plan_association_request request_pb
|
1699
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1700
|
+
.with_bindings(
|
1701
|
+
uri_method: :delete,
|
1702
|
+
uri_template: "/v1/{name}",
|
1703
|
+
matches: [
|
1704
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
|
1705
|
+
]
|
1706
|
+
)
|
1707
|
+
transcoder.transcode request_pb
|
1708
|
+
end
|
1709
|
+
|
1710
|
+
##
|
1711
|
+
# @private
|
1712
|
+
#
|
1713
|
+
# GRPC transcoding helper method for the trigger_backup REST call
|
1714
|
+
#
|
1715
|
+
# @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest]
|
1716
|
+
# A request object representing the call parameters. Required.
|
1717
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1718
|
+
# Uri, Body, Query string parameters
|
1719
|
+
def self.transcode_trigger_backup_request request_pb
|
1720
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1721
|
+
.with_bindings(
|
1722
|
+
uri_method: :post,
|
1723
|
+
uri_template: "/v1/{name}:triggerBackup",
|
1724
|
+
body: "*",
|
1725
|
+
matches: [
|
1726
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
|
296
1727
|
]
|
297
1728
|
)
|
298
1729
|
transcoder.transcode request_pb
|