google-cloud-backupdr-v1beta 0.a → 0.1.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.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy_pb.rb +30 -0
  6. data/lib/google/cloud/backupdr/v1beta/autoprotectionpolicy_pb.rb +39 -0
  7. data/lib/google/cloud/backupdr/v1beta/autoprotectionpolicybinding_pb.rb +32 -0
  8. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary/client.rb +532 -0
  9. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary/credentials.rb +48 -0
  10. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary/paths.rb +50 -0
  11. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary/rest/client.rb +491 -0
  12. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary/rest/service_stub.rb +142 -0
  13. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary/rest.rb +53 -0
  14. data/lib/google/cloud/backupdr/v1beta/backup_dr_protection_summary.rb +55 -0
  15. data/lib/google/cloud/backupdr/v1beta/backupdr/client.rb +6101 -0
  16. data/lib/google/cloud/backupdr/v1beta/backupdr/credentials.rb +48 -0
  17. data/lib/google/cloud/backupdr/v1beta/backupdr/operations.rb +843 -0
  18. data/lib/google/cloud/backupdr/v1beta/backupdr/paths.rb +372 -0
  19. data/lib/google/cloud/backupdr/v1beta/backupdr/rest/client.rb +5724 -0
  20. data/lib/google/cloud/backupdr/v1beta/backupdr/rest/operations.rb +927 -0
  21. data/lib/google/cloud/backupdr/v1beta/backupdr/rest/service_stub.rb +3086 -0
  22. data/lib/google/cloud/backupdr/v1beta/backupdr/rest.rb +54 -0
  23. data/lib/google/cloud/backupdr/v1beta/backupdr.rb +56 -0
  24. data/lib/google/cloud/backupdr/v1beta/backupdr_pb.rb +55 -0
  25. data/lib/google/cloud/backupdr/v1beta/backupdr_services_pb.rb +145 -0
  26. data/lib/google/cloud/backupdr/v1beta/backupplan_pb.rb +49 -0
  27. data/lib/google/cloud/backupdr/v1beta/backupplanassociation_pb.rb +42 -0
  28. data/lib/google/cloud/backupdr/v1beta/backupvault_alloydb_pb.rb +30 -0
  29. data/lib/google/cloud/backupdr/v1beta/backupvault_ba_pb.rb +24 -0
  30. data/lib/google/cloud/backupdr/v1beta/backupvault_cloudsql_pb.rb +30 -0
  31. data/lib/google/cloud/backupdr/v1beta/backupvault_disk_pb.rb +33 -0
  32. data/lib/google/cloud/backupdr/v1beta/backupvault_gce_pb.rb +66 -0
  33. data/lib/google/cloud/backupdr/v1beta/backupvault_pb.rb +80 -0
  34. data/lib/google/cloud/backupdr/v1beta/bindingmatchingresource_pb.rb +31 -0
  35. data/lib/google/cloud/backupdr/v1beta/bindings_override.rb +108 -0
  36. data/lib/google/cloud/backupdr/v1beta/datasourcereference_pb.rb +35 -0
  37. data/lib/google/cloud/backupdr/v1beta/protection_summary_pb.rb +40 -0
  38. data/lib/google/cloud/backupdr/v1beta/protection_summary_services_pb.rb +45 -0
  39. data/lib/google/cloud/backupdr/v1beta/rest.rb +39 -0
  40. data/lib/google/cloud/backupdr/v1beta/version.rb +8 -3
  41. data/lib/google/cloud/backupdr/v1beta.rb +46 -0
  42. data/lib/google-cloud-backupdr-v1beta.rb +21 -0
  43. data/proto_docs/README.md +4 -0
  44. data/proto_docs/google/api/client.rb +593 -0
  45. data/proto_docs/google/api/field_behavior.rb +85 -0
  46. data/proto_docs/google/api/field_info.rb +88 -0
  47. data/proto_docs/google/api/launch_stage.rb +71 -0
  48. data/proto_docs/google/api/resource.rb +227 -0
  49. data/proto_docs/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.rb +121 -0
  50. data/proto_docs/google/cloud/backupdr/v1beta/autoprotectionpolicy.rb +277 -0
  51. data/proto_docs/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.rb +180 -0
  52. data/proto_docs/google/cloud/backupdr/v1beta/backupdr.rb +428 -0
  53. data/proto_docs/google/cloud/backupdr/v1beta/backupplan.rb +637 -0
  54. data/proto_docs/google/cloud/backupdr/v1beta/backupplanassociation.rb +423 -0
  55. data/proto_docs/google/cloud/backupdr/v1beta/backupvault.rb +1391 -0
  56. data/proto_docs/google/cloud/backupdr/v1beta/backupvault_alloydb.rb +105 -0
  57. data/proto_docs/google/cloud/backupdr/v1beta/backupvault_ba.rb +47 -0
  58. data/proto_docs/google/cloud/backupdr/v1beta/backupvault_cloudsql.rb +131 -0
  59. data/proto_docs/google/cloud/backupdr/v1beta/backupvault_disk.rb +301 -0
  60. data/proto_docs/google/cloud/backupdr/v1beta/backupvault_gce.rb +1010 -0
  61. data/proto_docs/google/cloud/backupdr/v1beta/bindingmatchingresource.rb +160 -0
  62. data/proto_docs/google/cloud/backupdr/v1beta/datasourcereference.rb +236 -0
  63. data/proto_docs/google/cloud/backupdr/v1beta/protection_summary.rb +309 -0
  64. data/proto_docs/google/longrunning/operations.rb +191 -0
  65. data/proto_docs/google/protobuf/any.rb +145 -0
  66. data/proto_docs/google/protobuf/duration.rb +98 -0
  67. data/proto_docs/google/protobuf/empty.rb +34 -0
  68. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  69. data/proto_docs/google/protobuf/timestamp.rb +128 -0
  70. data/proto_docs/google/protobuf/wrappers.rb +148 -0
  71. data/proto_docs/google/rpc/status.rb +48 -0
  72. data/proto_docs/google/type/dayofweek.rb +49 -0
  73. data/proto_docs/google/type/month.rb +64 -0
  74. metadata +134 -9
@@ -0,0 +1,3086 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/backupdr/v1beta/backupdr_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module BackupDR
24
+ module V1beta
25
+ module BackupDR
26
+ module Rest
27
+ ##
28
+ # REST service stub for the BackupDR service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
47
+ end
48
+
49
+ ##
50
+ # The effective universe domain
51
+ #
52
+ # @return [String]
53
+ #
54
+ def universe_domain
55
+ @client_stub.universe_domain
56
+ end
57
+
58
+ ##
59
+ # The effective endpoint
60
+ #
61
+ # @return [String]
62
+ #
63
+ def endpoint
64
+ @client_stub.endpoint
65
+ end
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
+
76
+ ##
77
+ # Baseline implementation for the list_management_servers REST call
78
+ #
79
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListManagementServersRequest]
80
+ # A request object representing the call parameters. Required.
81
+ # @param options [::Gapic::CallOptions]
82
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
+ #
84
+ # @yield [result, operation] Access the result along with the TransportOperation object
85
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListManagementServersResponse]
86
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
+ #
88
+ # @return [::Google::Cloud::BackupDR::V1beta::ListManagementServersResponse]
89
+ # A result object deserialized from the server's reply
90
+ def list_management_servers request_pb, options = nil
91
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
+
93
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb
94
+ query_string_params = if query_string_params.any?
95
+ query_string_params.to_h { |p| p.split "=", 2 }
96
+ else
97
+ {}
98
+ end
99
+
100
+ response = @client_stub.make_http_request(
101
+ verb,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "list_management_servers",
106
+ options: options
107
+ )
108
+ operation = ::Gapic::Rest::TransportOperation.new response
109
+ result = ::Google::Cloud::BackupDR::V1beta::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
114
+ end
115
+
116
+ ##
117
+ # Baseline implementation for the get_management_server REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetManagementServerRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @param options [::Gapic::CallOptions]
122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
123
+ #
124
+ # @yield [result, operation] Access the result along with the TransportOperation object
125
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ManagementServer]
126
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
127
+ #
128
+ # @return [::Google::Cloud::BackupDR::V1beta::ManagementServer]
129
+ # A result object deserialized from the server's reply
130
+ def get_management_server request_pb, options = nil
131
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
132
+
133
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb
134
+ query_string_params = if query_string_params.any?
135
+ query_string_params.to_h { |p| p.split "=", 2 }
136
+ else
137
+ {}
138
+ end
139
+
140
+ response = @client_stub.make_http_request(
141
+ verb,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "get_management_server",
146
+ options: options
147
+ )
148
+ operation = ::Gapic::Rest::TransportOperation.new response
149
+ result = ::Google::Cloud::BackupDR::V1beta::ManagementServer.decode_json response.body, ignore_unknown_fields: true
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
154
+ end
155
+
156
+ ##
157
+ # Baseline implementation for the create_management_server REST call
158
+ #
159
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateManagementServerRequest]
160
+ # A request object representing the call parameters. Required.
161
+ # @param options [::Gapic::CallOptions]
162
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
163
+ #
164
+ # @yield [result, operation] Access the result along with the TransportOperation object
165
+ # @yieldparam result [::Google::Longrunning::Operation]
166
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
167
+ #
168
+ # @return [::Google::Longrunning::Operation]
169
+ # A result object deserialized from the server's reply
170
+ def create_management_server request_pb, options = nil
171
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
172
+
173
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb
174
+ query_string_params = if query_string_params.any?
175
+ query_string_params.to_h { |p| p.split "=", 2 }
176
+ else
177
+ {}
178
+ end
179
+
180
+ response = @client_stub.make_http_request(
181
+ verb,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "create_management_server",
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+ end
195
+
196
+ ##
197
+ # Baseline implementation for the delete_management_server REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteManagementServerRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @param options [::Gapic::CallOptions]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @yield [result, operation] Access the result along with the TransportOperation object
205
+ # @yieldparam result [::Google::Longrunning::Operation]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Longrunning::Operation]
209
+ # A result object deserialized from the server's reply
210
+ def delete_management_server request_pb, options = nil
211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
212
+
213
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb
214
+ query_string_params = if query_string_params.any?
215
+ query_string_params.to_h { |p| p.split "=", 2 }
216
+ else
217
+ {}
218
+ end
219
+
220
+ response = @client_stub.make_http_request(
221
+ verb,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "delete_management_server",
226
+ options: options
227
+ )
228
+ operation = ::Gapic::Rest::TransportOperation.new response
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::V1beta::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?
252
+
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
274
+ end
275
+
276
+ ##
277
+ # Baseline implementation for the list_backup_vaults REST call
278
+ #
279
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::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.
283
+ #
284
+ # @yield [result, operation] Access the result along with the TransportOperation object
285
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListBackupVaultsResponse]
286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
287
+ #
288
+ # @return [::Google::Cloud::BackupDR::V1beta::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::V1beta::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::V1beta::FetchUsableBackupVaultsRequest]
320
+ # A request object representing the call parameters. Required.
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::V1beta::FetchUsableBackupVaultsResponse]
326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
327
+ #
328
+ # @return [::Google::Cloud::BackupDR::V1beta::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::V1beta::FetchUsableBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
354
+ end
355
+
356
+ ##
357
+ # Baseline implementation for the get_backup_vault REST call
358
+ #
359
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::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.
363
+ #
364
+ # @yield [result, operation] Access the result along with the TransportOperation object
365
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::BackupVault]
366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
367
+ #
368
+ # @return [::Google::Cloud::BackupDR::V1beta::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::V1beta::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::V1beta::UpdateBackupVaultRequest]
400
+ # A request object representing the call parameters. Required.
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
434
+ end
435
+
436
+ ##
437
+ # Baseline implementation for the delete_backup_vault REST call
438
+ #
439
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::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.
443
+ #
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::V1beta::ListDataSourcesRequest]
480
+ # A request object representing the call parameters. Required.
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::V1beta::ListDataSourcesResponse]
486
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
487
+ #
488
+ # @return [::Google::Cloud::BackupDR::V1beta::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::V1beta::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true
510
+ catch :response do
511
+ yield result, operation if block_given?
512
+ result
513
+ end
514
+ end
515
+
516
+ ##
517
+ # Baseline implementation for the get_data_source REST call
518
+ #
519
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::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.
523
+ #
524
+ # @yield [result, operation] Access the result along with the TransportOperation object
525
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::DataSource]
526
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
527
+ #
528
+ # @return [::Google::Cloud::BackupDR::V1beta::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::V1beta::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::V1beta::UpdateDataSourceRequest]
560
+ # A request object representing the call parameters. Required.
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::V1beta::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::V1beta::ListBackupsResponse]
606
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
607
+ #
608
+ # @return [::Google::Cloud::BackupDR::V1beta::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::V1beta::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 fetch_backups_for_resource_type REST call
638
+ #
639
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchBackupsForResourceTypeRequest]
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::V1beta::FetchBackupsForResourceTypeResponse]
646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
647
+ #
648
+ # @return [::Google::Cloud::BackupDR::V1beta::FetchBackupsForResourceTypeResponse]
649
+ # A result object deserialized from the server's reply
650
+ def fetch_backups_for_resource_type 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_fetch_backups_for_resource_type_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: "fetch_backups_for_resource_type",
666
+ options: options
667
+ )
668
+ operation = ::Gapic::Rest::TransportOperation.new response
669
+ result = ::Google::Cloud::BackupDR::V1beta::FetchBackupsForResourceTypeResponse.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 get_backup REST call
678
+ #
679
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupRequest]
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::Cloud::BackupDR::V1beta::Backup]
686
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
687
+ #
688
+ # @return [::Google::Cloud::BackupDR::V1beta::Backup]
689
+ # A result object deserialized from the server's reply
690
+ def get_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_get_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: "get_backup",
706
+ options: options
707
+ )
708
+ operation = ::Gapic::Rest::TransportOperation.new response
709
+ result = ::Google::Cloud::BackupDR::V1beta::Backup.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 update_backup REST call
718
+ #
719
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupRequest]
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 update_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_update_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: "update_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 delete_backup REST call
758
+ #
759
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupRequest]
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 delete_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_delete_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: "delete_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 restore_backup REST call
798
+ #
799
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::RestoreBackupRequest]
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 restore_backup 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_restore_backup_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: "restore_backup",
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 create_backup_plan REST call
838
+ #
839
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateBackupPlanRequest]
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::Longrunning::Operation]
846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
847
+ #
848
+ # @return [::Google::Longrunning::Operation]
849
+ # A result object deserialized from the server's reply
850
+ def create_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_create_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: "create_backup_plan",
866
+ options: options
867
+ )
868
+ operation = ::Gapic::Rest::TransportOperation.new response
869
+ result = ::Google::Longrunning::Operation.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 update_backup_plan REST call
878
+ #
879
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupPlanRequest]
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::Longrunning::Operation]
886
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
887
+ #
888
+ # @return [::Google::Longrunning::Operation]
889
+ # A result object deserialized from the server's reply
890
+ def update_backup_plan 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_update_backup_plan_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: "update_backup_plan",
906
+ options: options
907
+ )
908
+ operation = ::Gapic::Rest::TransportOperation.new response
909
+ result = ::Google::Longrunning::Operation.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 get_backup_plan REST call
918
+ #
919
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupPlanRequest]
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::Cloud::BackupDR::V1beta::BackupPlan]
926
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
927
+ #
928
+ # @return [::Google::Cloud::BackupDR::V1beta::BackupPlan]
929
+ # A result object deserialized from the server's reply
930
+ def get_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_get_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: "get_backup_plan",
946
+ options: options
947
+ )
948
+ operation = ::Gapic::Rest::TransportOperation.new response
949
+ result = ::Google::Cloud::BackupDR::V1beta::BackupPlan.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 list_backup_plans REST call
958
+ #
959
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupPlansRequest]
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::Cloud::BackupDR::V1beta::ListBackupPlansResponse]
966
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
967
+ #
968
+ # @return [::Google::Cloud::BackupDR::V1beta::ListBackupPlansResponse]
969
+ # A result object deserialized from the server's reply
970
+ def list_backup_plans 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_list_backup_plans_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: "list_backup_plans",
986
+ options: options
987
+ )
988
+ operation = ::Gapic::Rest::TransportOperation.new response
989
+ result = ::Google::Cloud::BackupDR::V1beta::ListBackupPlansResponse.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 delete_backup_plan REST call
998
+ #
999
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupPlanRequest]
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::Longrunning::Operation]
1006
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1007
+ #
1008
+ # @return [::Google::Longrunning::Operation]
1009
+ # A result object deserialized from the server's reply
1010
+ def delete_backup_plan 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_delete_backup_plan_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: "delete_backup_plan",
1026
+ options: options
1027
+ )
1028
+ operation = ::Gapic::Rest::TransportOperation.new response
1029
+ result = ::Google::Longrunning::Operation.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 get_backup_plan_revision REST call
1038
+ #
1039
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupPlanRevisionRequest]
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::V1beta::BackupPlanRevision]
1046
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1047
+ #
1048
+ # @return [::Google::Cloud::BackupDR::V1beta::BackupPlanRevision]
1049
+ # A result object deserialized from the server's reply
1050
+ def get_backup_plan_revision 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_get_backup_plan_revision_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: "get_backup_plan_revision",
1066
+ options: options
1067
+ )
1068
+ operation = ::Gapic::Rest::TransportOperation.new response
1069
+ result = ::Google::Cloud::BackupDR::V1beta::BackupPlanRevision.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 list_backup_plan_revisions REST call
1078
+ #
1079
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupPlanRevisionsRequest]
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::Cloud::BackupDR::V1beta::ListBackupPlanRevisionsResponse]
1086
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1087
+ #
1088
+ # @return [::Google::Cloud::BackupDR::V1beta::ListBackupPlanRevisionsResponse]
1089
+ # A result object deserialized from the server's reply
1090
+ def list_backup_plan_revisions 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_list_backup_plan_revisions_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: "list_backup_plan_revisions",
1106
+ options: options
1107
+ )
1108
+ operation = ::Gapic::Rest::TransportOperation.new response
1109
+ result = ::Google::Cloud::BackupDR::V1beta::ListBackupPlanRevisionsResponse.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 create_backup_plan_association REST call
1118
+ #
1119
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateBackupPlanAssociationRequest]
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 create_backup_plan_association 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_create_backup_plan_association_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: "create_backup_plan_association",
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
+ # Baseline implementation for the update_backup_plan_association REST call
1158
+ #
1159
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupPlanAssociationRequest]
1160
+ # A request object representing the call parameters. Required.
1161
+ # @param options [::Gapic::CallOptions]
1162
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1163
+ #
1164
+ # @yield [result, operation] Access the result along with the TransportOperation object
1165
+ # @yieldparam result [::Google::Longrunning::Operation]
1166
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1167
+ #
1168
+ # @return [::Google::Longrunning::Operation]
1169
+ # A result object deserialized from the server's reply
1170
+ def update_backup_plan_association request_pb, options = nil
1171
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1172
+
1173
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb
1174
+ query_string_params = if query_string_params.any?
1175
+ query_string_params.to_h { |p| p.split "=", 2 }
1176
+ else
1177
+ {}
1178
+ end
1179
+
1180
+ response = @client_stub.make_http_request(
1181
+ verb,
1182
+ uri: uri,
1183
+ body: body || "",
1184
+ params: query_string_params,
1185
+ method_name: "update_backup_plan_association",
1186
+ options: options
1187
+ )
1188
+ operation = ::Gapic::Rest::TransportOperation.new response
1189
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1190
+ catch :response do
1191
+ yield result, operation if block_given?
1192
+ result
1193
+ end
1194
+ end
1195
+
1196
+ ##
1197
+ # Baseline implementation for the get_backup_plan_association REST call
1198
+ #
1199
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupPlanAssociationRequest]
1200
+ # A request object representing the call parameters. Required.
1201
+ # @param options [::Gapic::CallOptions]
1202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1203
+ #
1204
+ # @yield [result, operation] Access the result along with the TransportOperation object
1205
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::BackupPlanAssociation]
1206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1207
+ #
1208
+ # @return [::Google::Cloud::BackupDR::V1beta::BackupPlanAssociation]
1209
+ # A result object deserialized from the server's reply
1210
+ def get_backup_plan_association request_pb, options = nil
1211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1212
+
1213
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb
1214
+ query_string_params = if query_string_params.any?
1215
+ query_string_params.to_h { |p| p.split "=", 2 }
1216
+ else
1217
+ {}
1218
+ end
1219
+
1220
+ response = @client_stub.make_http_request(
1221
+ verb,
1222
+ uri: uri,
1223
+ body: body || "",
1224
+ params: query_string_params,
1225
+ method_name: "get_backup_plan_association",
1226
+ options: options
1227
+ )
1228
+ operation = ::Gapic::Rest::TransportOperation.new response
1229
+ result = ::Google::Cloud::BackupDR::V1beta::BackupPlanAssociation.decode_json response.body, ignore_unknown_fields: true
1230
+ catch :response do
1231
+ yield result, operation if block_given?
1232
+ result
1233
+ end
1234
+ end
1235
+
1236
+ ##
1237
+ # Baseline implementation for the list_backup_plan_associations REST call
1238
+ #
1239
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupPlanAssociationsRequest]
1240
+ # A request object representing the call parameters. Required.
1241
+ # @param options [::Gapic::CallOptions]
1242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1243
+ #
1244
+ # @yield [result, operation] Access the result along with the TransportOperation object
1245
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListBackupPlanAssociationsResponse]
1246
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1247
+ #
1248
+ # @return [::Google::Cloud::BackupDR::V1beta::ListBackupPlanAssociationsResponse]
1249
+ # A result object deserialized from the server's reply
1250
+ def list_backup_plan_associations request_pb, options = nil
1251
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1252
+
1253
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb
1254
+ query_string_params = if query_string_params.any?
1255
+ query_string_params.to_h { |p| p.split "=", 2 }
1256
+ else
1257
+ {}
1258
+ end
1259
+
1260
+ response = @client_stub.make_http_request(
1261
+ verb,
1262
+ uri: uri,
1263
+ body: body || "",
1264
+ params: query_string_params,
1265
+ method_name: "list_backup_plan_associations",
1266
+ options: options
1267
+ )
1268
+ operation = ::Gapic::Rest::TransportOperation.new response
1269
+ result = ::Google::Cloud::BackupDR::V1beta::ListBackupPlanAssociationsResponse.decode_json response.body, ignore_unknown_fields: true
1270
+ catch :response do
1271
+ yield result, operation if block_given?
1272
+ result
1273
+ end
1274
+ end
1275
+
1276
+ ##
1277
+ # Baseline implementation for the fetch_backup_plan_associations_for_resource_type REST call
1278
+ #
1279
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchBackupPlanAssociationsForResourceTypeRequest]
1280
+ # A request object representing the call parameters. Required.
1281
+ # @param options [::Gapic::CallOptions]
1282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1283
+ #
1284
+ # @yield [result, operation] Access the result along with the TransportOperation object
1285
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::FetchBackupPlanAssociationsForResourceTypeResponse]
1286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1287
+ #
1288
+ # @return [::Google::Cloud::BackupDR::V1beta::FetchBackupPlanAssociationsForResourceTypeResponse]
1289
+ # A result object deserialized from the server's reply
1290
+ def fetch_backup_plan_associations_for_resource_type request_pb, options = nil
1291
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1292
+
1293
+ verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb
1294
+ query_string_params = if query_string_params.any?
1295
+ query_string_params.to_h { |p| p.split "=", 2 }
1296
+ else
1297
+ {}
1298
+ end
1299
+
1300
+ response = @client_stub.make_http_request(
1301
+ verb,
1302
+ uri: uri,
1303
+ body: body || "",
1304
+ params: query_string_params,
1305
+ method_name: "fetch_backup_plan_associations_for_resource_type",
1306
+ options: options
1307
+ )
1308
+ operation = ::Gapic::Rest::TransportOperation.new response
1309
+ result = ::Google::Cloud::BackupDR::V1beta::FetchBackupPlanAssociationsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true
1310
+ catch :response do
1311
+ yield result, operation if block_given?
1312
+ result
1313
+ end
1314
+ end
1315
+
1316
+ ##
1317
+ # Baseline implementation for the delete_backup_plan_association REST call
1318
+ #
1319
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupPlanAssociationRequest]
1320
+ # A request object representing the call parameters. Required.
1321
+ # @param options [::Gapic::CallOptions]
1322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1323
+ #
1324
+ # @yield [result, operation] Access the result along with the TransportOperation object
1325
+ # @yieldparam result [::Google::Longrunning::Operation]
1326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1327
+ #
1328
+ # @return [::Google::Longrunning::Operation]
1329
+ # A result object deserialized from the server's reply
1330
+ def delete_backup_plan_association request_pb, options = nil
1331
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1332
+
1333
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb
1334
+ query_string_params = if query_string_params.any?
1335
+ query_string_params.to_h { |p| p.split "=", 2 }
1336
+ else
1337
+ {}
1338
+ end
1339
+
1340
+ response = @client_stub.make_http_request(
1341
+ verb,
1342
+ uri: uri,
1343
+ body: body || "",
1344
+ params: query_string_params,
1345
+ method_name: "delete_backup_plan_association",
1346
+ options: options
1347
+ )
1348
+ operation = ::Gapic::Rest::TransportOperation.new response
1349
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1350
+ catch :response do
1351
+ yield result, operation if block_given?
1352
+ result
1353
+ end
1354
+ end
1355
+
1356
+ ##
1357
+ # Baseline implementation for the trigger_backup REST call
1358
+ #
1359
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::TriggerBackupRequest]
1360
+ # A request object representing the call parameters. Required.
1361
+ # @param options [::Gapic::CallOptions]
1362
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1363
+ #
1364
+ # @yield [result, operation] Access the result along with the TransportOperation object
1365
+ # @yieldparam result [::Google::Longrunning::Operation]
1366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1367
+ #
1368
+ # @return [::Google::Longrunning::Operation]
1369
+ # A result object deserialized from the server's reply
1370
+ def trigger_backup request_pb, options = nil
1371
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1372
+
1373
+ verb, uri, query_string_params, body = ServiceStub.transcode_trigger_backup_request request_pb
1374
+ query_string_params = if query_string_params.any?
1375
+ query_string_params.to_h { |p| p.split "=", 2 }
1376
+ else
1377
+ {}
1378
+ end
1379
+
1380
+ response = @client_stub.make_http_request(
1381
+ verb,
1382
+ uri: uri,
1383
+ body: body || "",
1384
+ params: query_string_params,
1385
+ method_name: "trigger_backup",
1386
+ options: options
1387
+ )
1388
+ operation = ::Gapic::Rest::TransportOperation.new response
1389
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1390
+ catch :response do
1391
+ yield result, operation if block_given?
1392
+ result
1393
+ end
1394
+ end
1395
+
1396
+ ##
1397
+ # Baseline implementation for the get_data_source_reference REST call
1398
+ #
1399
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetDataSourceReferenceRequest]
1400
+ # A request object representing the call parameters. Required.
1401
+ # @param options [::Gapic::CallOptions]
1402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1403
+ #
1404
+ # @yield [result, operation] Access the result along with the TransportOperation object
1405
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::DataSourceReference]
1406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1407
+ #
1408
+ # @return [::Google::Cloud::BackupDR::V1beta::DataSourceReference]
1409
+ # A result object deserialized from the server's reply
1410
+ def get_data_source_reference request_pb, options = nil
1411
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1412
+
1413
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb
1414
+ query_string_params = if query_string_params.any?
1415
+ query_string_params.to_h { |p| p.split "=", 2 }
1416
+ else
1417
+ {}
1418
+ end
1419
+
1420
+ response = @client_stub.make_http_request(
1421
+ verb,
1422
+ uri: uri,
1423
+ body: body || "",
1424
+ params: query_string_params,
1425
+ method_name: "get_data_source_reference",
1426
+ options: options
1427
+ )
1428
+ operation = ::Gapic::Rest::TransportOperation.new response
1429
+ result = ::Google::Cloud::BackupDR::V1beta::DataSourceReference.decode_json response.body, ignore_unknown_fields: true
1430
+ catch :response do
1431
+ yield result, operation if block_given?
1432
+ result
1433
+ end
1434
+ end
1435
+
1436
+ ##
1437
+ # Baseline implementation for the list_data_source_references REST call
1438
+ #
1439
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListDataSourceReferencesRequest]
1440
+ # A request object representing the call parameters. Required.
1441
+ # @param options [::Gapic::CallOptions]
1442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1443
+ #
1444
+ # @yield [result, operation] Access the result along with the TransportOperation object
1445
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListDataSourceReferencesResponse]
1446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1447
+ #
1448
+ # @return [::Google::Cloud::BackupDR::V1beta::ListDataSourceReferencesResponse]
1449
+ # A result object deserialized from the server's reply
1450
+ def list_data_source_references request_pb, options = nil
1451
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1452
+
1453
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb
1454
+ query_string_params = if query_string_params.any?
1455
+ query_string_params.to_h { |p| p.split "=", 2 }
1456
+ else
1457
+ {}
1458
+ end
1459
+
1460
+ response = @client_stub.make_http_request(
1461
+ verb,
1462
+ uri: uri,
1463
+ body: body || "",
1464
+ params: query_string_params,
1465
+ method_name: "list_data_source_references",
1466
+ options: options
1467
+ )
1468
+ operation = ::Gapic::Rest::TransportOperation.new response
1469
+ result = ::Google::Cloud::BackupDR::V1beta::ListDataSourceReferencesResponse.decode_json response.body, ignore_unknown_fields: true
1470
+ catch :response do
1471
+ yield result, operation if block_given?
1472
+ result
1473
+ end
1474
+ end
1475
+
1476
+ ##
1477
+ # Baseline implementation for the fetch_data_source_references_for_resource_type REST call
1478
+ #
1479
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchDataSourceReferencesForResourceTypeRequest]
1480
+ # A request object representing the call parameters. Required.
1481
+ # @param options [::Gapic::CallOptions]
1482
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1483
+ #
1484
+ # @yield [result, operation] Access the result along with the TransportOperation object
1485
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::FetchDataSourceReferencesForResourceTypeResponse]
1486
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1487
+ #
1488
+ # @return [::Google::Cloud::BackupDR::V1beta::FetchDataSourceReferencesForResourceTypeResponse]
1489
+ # A result object deserialized from the server's reply
1490
+ def fetch_data_source_references_for_resource_type request_pb, options = nil
1491
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1492
+
1493
+ verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb
1494
+ query_string_params = if query_string_params.any?
1495
+ query_string_params.to_h { |p| p.split "=", 2 }
1496
+ else
1497
+ {}
1498
+ end
1499
+
1500
+ response = @client_stub.make_http_request(
1501
+ verb,
1502
+ uri: uri,
1503
+ body: body || "",
1504
+ params: query_string_params,
1505
+ method_name: "fetch_data_source_references_for_resource_type",
1506
+ options: options
1507
+ )
1508
+ operation = ::Gapic::Rest::TransportOperation.new response
1509
+ result = ::Google::Cloud::BackupDR::V1beta::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true
1510
+ catch :response do
1511
+ yield result, operation if block_given?
1512
+ result
1513
+ end
1514
+ end
1515
+
1516
+ ##
1517
+ # Baseline implementation for the initialize_service REST call
1518
+ #
1519
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::InitializeServiceRequest]
1520
+ # A request object representing the call parameters. Required.
1521
+ # @param options [::Gapic::CallOptions]
1522
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1523
+ #
1524
+ # @yield [result, operation] Access the result along with the TransportOperation object
1525
+ # @yieldparam result [::Google::Longrunning::Operation]
1526
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1527
+ #
1528
+ # @return [::Google::Longrunning::Operation]
1529
+ # A result object deserialized from the server's reply
1530
+ def initialize_service request_pb, options = nil
1531
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1532
+
1533
+ verb, uri, query_string_params, body = ServiceStub.transcode_initialize_service_request request_pb
1534
+ query_string_params = if query_string_params.any?
1535
+ query_string_params.to_h { |p| p.split "=", 2 }
1536
+ else
1537
+ {}
1538
+ end
1539
+
1540
+ response = @client_stub.make_http_request(
1541
+ verb,
1542
+ uri: uri,
1543
+ body: body || "",
1544
+ params: query_string_params,
1545
+ method_name: "initialize_service",
1546
+ options: options
1547
+ )
1548
+ operation = ::Gapic::Rest::TransportOperation.new response
1549
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1550
+ catch :response do
1551
+ yield result, operation if block_given?
1552
+ result
1553
+ end
1554
+ end
1555
+
1556
+ ##
1557
+ # Baseline implementation for the create_auto_protection_policy REST call
1558
+ #
1559
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateAutoProtectionPolicyRequest]
1560
+ # A request object representing the call parameters. Required.
1561
+ # @param options [::Gapic::CallOptions]
1562
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1563
+ #
1564
+ # @yield [result, operation] Access the result along with the TransportOperation object
1565
+ # @yieldparam result [::Google::Longrunning::Operation]
1566
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1567
+ #
1568
+ # @return [::Google::Longrunning::Operation]
1569
+ # A result object deserialized from the server's reply
1570
+ def create_auto_protection_policy request_pb, options = nil
1571
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1572
+
1573
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_auto_protection_policy_request request_pb
1574
+ query_string_params = if query_string_params.any?
1575
+ query_string_params.to_h { |p| p.split "=", 2 }
1576
+ else
1577
+ {}
1578
+ end
1579
+
1580
+ response = @client_stub.make_http_request(
1581
+ verb,
1582
+ uri: uri,
1583
+ body: body || "",
1584
+ params: query_string_params,
1585
+ method_name: "create_auto_protection_policy",
1586
+ options: options
1587
+ )
1588
+ operation = ::Gapic::Rest::TransportOperation.new response
1589
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1590
+ catch :response do
1591
+ yield result, operation if block_given?
1592
+ result
1593
+ end
1594
+ end
1595
+
1596
+ ##
1597
+ # Baseline implementation for the list_auto_protection_policies REST call
1598
+ #
1599
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPoliciesRequest]
1600
+ # A request object representing the call parameters. Required.
1601
+ # @param options [::Gapic::CallOptions]
1602
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1603
+ #
1604
+ # @yield [result, operation] Access the result along with the TransportOperation object
1605
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPoliciesResponse]
1606
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1607
+ #
1608
+ # @return [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPoliciesResponse]
1609
+ # A result object deserialized from the server's reply
1610
+ def list_auto_protection_policies request_pb, options = nil
1611
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1612
+
1613
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_auto_protection_policies_request request_pb
1614
+ query_string_params = if query_string_params.any?
1615
+ query_string_params.to_h { |p| p.split "=", 2 }
1616
+ else
1617
+ {}
1618
+ end
1619
+
1620
+ response = @client_stub.make_http_request(
1621
+ verb,
1622
+ uri: uri,
1623
+ body: body || "",
1624
+ params: query_string_params,
1625
+ method_name: "list_auto_protection_policies",
1626
+ options: options
1627
+ )
1628
+ operation = ::Gapic::Rest::TransportOperation.new response
1629
+ result = ::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPoliciesResponse.decode_json response.body, ignore_unknown_fields: true
1630
+ catch :response do
1631
+ yield result, operation if block_given?
1632
+ result
1633
+ end
1634
+ end
1635
+
1636
+ ##
1637
+ # Baseline implementation for the get_auto_protection_policy REST call
1638
+ #
1639
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetAutoProtectionPolicyRequest]
1640
+ # A request object representing the call parameters. Required.
1641
+ # @param options [::Gapic::CallOptions]
1642
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1643
+ #
1644
+ # @yield [result, operation] Access the result along with the TransportOperation object
1645
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::AutoProtectionPolicy]
1646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1647
+ #
1648
+ # @return [::Google::Cloud::BackupDR::V1beta::AutoProtectionPolicy]
1649
+ # A result object deserialized from the server's reply
1650
+ def get_auto_protection_policy request_pb, options = nil
1651
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1652
+
1653
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_auto_protection_policy_request request_pb
1654
+ query_string_params = if query_string_params.any?
1655
+ query_string_params.to_h { |p| p.split "=", 2 }
1656
+ else
1657
+ {}
1658
+ end
1659
+
1660
+ response = @client_stub.make_http_request(
1661
+ verb,
1662
+ uri: uri,
1663
+ body: body || "",
1664
+ params: query_string_params,
1665
+ method_name: "get_auto_protection_policy",
1666
+ options: options
1667
+ )
1668
+ operation = ::Gapic::Rest::TransportOperation.new response
1669
+ result = ::Google::Cloud::BackupDR::V1beta::AutoProtectionPolicy.decode_json response.body, ignore_unknown_fields: true
1670
+ catch :response do
1671
+ yield result, operation if block_given?
1672
+ result
1673
+ end
1674
+ end
1675
+
1676
+ ##
1677
+ # Baseline implementation for the update_auto_protection_policy REST call
1678
+ #
1679
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateAutoProtectionPolicyRequest]
1680
+ # A request object representing the call parameters. Required.
1681
+ # @param options [::Gapic::CallOptions]
1682
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1683
+ #
1684
+ # @yield [result, operation] Access the result along with the TransportOperation object
1685
+ # @yieldparam result [::Google::Longrunning::Operation]
1686
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1687
+ #
1688
+ # @return [::Google::Longrunning::Operation]
1689
+ # A result object deserialized from the server's reply
1690
+ def update_auto_protection_policy request_pb, options = nil
1691
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1692
+
1693
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_auto_protection_policy_request request_pb
1694
+ query_string_params = if query_string_params.any?
1695
+ query_string_params.to_h { |p| p.split "=", 2 }
1696
+ else
1697
+ {}
1698
+ end
1699
+
1700
+ response = @client_stub.make_http_request(
1701
+ verb,
1702
+ uri: uri,
1703
+ body: body || "",
1704
+ params: query_string_params,
1705
+ method_name: "update_auto_protection_policy",
1706
+ options: options
1707
+ )
1708
+ operation = ::Gapic::Rest::TransportOperation.new response
1709
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1710
+ catch :response do
1711
+ yield result, operation if block_given?
1712
+ result
1713
+ end
1714
+ end
1715
+
1716
+ ##
1717
+ # Baseline implementation for the delete_auto_protection_policy REST call
1718
+ #
1719
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteAutoProtectionPolicyRequest]
1720
+ # A request object representing the call parameters. Required.
1721
+ # @param options [::Gapic::CallOptions]
1722
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1723
+ #
1724
+ # @yield [result, operation] Access the result along with the TransportOperation object
1725
+ # @yieldparam result [::Google::Longrunning::Operation]
1726
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1727
+ #
1728
+ # @return [::Google::Longrunning::Operation]
1729
+ # A result object deserialized from the server's reply
1730
+ def delete_auto_protection_policy request_pb, options = nil
1731
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1732
+
1733
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_auto_protection_policy_request request_pb
1734
+ query_string_params = if query_string_params.any?
1735
+ query_string_params.to_h { |p| p.split "=", 2 }
1736
+ else
1737
+ {}
1738
+ end
1739
+
1740
+ response = @client_stub.make_http_request(
1741
+ verb,
1742
+ uri: uri,
1743
+ body: body || "",
1744
+ params: query_string_params,
1745
+ method_name: "delete_auto_protection_policy",
1746
+ options: options
1747
+ )
1748
+ operation = ::Gapic::Rest::TransportOperation.new response
1749
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1750
+ catch :response do
1751
+ yield result, operation if block_given?
1752
+ result
1753
+ end
1754
+ end
1755
+
1756
+ ##
1757
+ # Baseline implementation for the create_auto_protection_policy_binding REST call
1758
+ #
1759
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateAutoProtectionPolicyBindingRequest]
1760
+ # A request object representing the call parameters. Required.
1761
+ # @param options [::Gapic::CallOptions]
1762
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1763
+ #
1764
+ # @yield [result, operation] Access the result along with the TransportOperation object
1765
+ # @yieldparam result [::Google::Longrunning::Operation]
1766
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1767
+ #
1768
+ # @return [::Google::Longrunning::Operation]
1769
+ # A result object deserialized from the server's reply
1770
+ def create_auto_protection_policy_binding request_pb, options = nil
1771
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1772
+
1773
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_auto_protection_policy_binding_request request_pb
1774
+ query_string_params = if query_string_params.any?
1775
+ query_string_params.to_h { |p| p.split "=", 2 }
1776
+ else
1777
+ {}
1778
+ end
1779
+
1780
+ response = @client_stub.make_http_request(
1781
+ verb,
1782
+ uri: uri,
1783
+ body: body || "",
1784
+ params: query_string_params,
1785
+ method_name: "create_auto_protection_policy_binding",
1786
+ options: options
1787
+ )
1788
+ operation = ::Gapic::Rest::TransportOperation.new response
1789
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1790
+ catch :response do
1791
+ yield result, operation if block_given?
1792
+ result
1793
+ end
1794
+ end
1795
+
1796
+ ##
1797
+ # Baseline implementation for the get_auto_protection_policy_binding REST call
1798
+ #
1799
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetAutoProtectionPolicyBindingRequest]
1800
+ # A request object representing the call parameters. Required.
1801
+ # @param options [::Gapic::CallOptions]
1802
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1803
+ #
1804
+ # @yield [result, operation] Access the result along with the TransportOperation object
1805
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::AutoProtectionPolicyBinding]
1806
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1807
+ #
1808
+ # @return [::Google::Cloud::BackupDR::V1beta::AutoProtectionPolicyBinding]
1809
+ # A result object deserialized from the server's reply
1810
+ def get_auto_protection_policy_binding request_pb, options = nil
1811
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1812
+
1813
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_auto_protection_policy_binding_request request_pb
1814
+ query_string_params = if query_string_params.any?
1815
+ query_string_params.to_h { |p| p.split "=", 2 }
1816
+ else
1817
+ {}
1818
+ end
1819
+
1820
+ response = @client_stub.make_http_request(
1821
+ verb,
1822
+ uri: uri,
1823
+ body: body || "",
1824
+ params: query_string_params,
1825
+ method_name: "get_auto_protection_policy_binding",
1826
+ options: options
1827
+ )
1828
+ operation = ::Gapic::Rest::TransportOperation.new response
1829
+ result = ::Google::Cloud::BackupDR::V1beta::AutoProtectionPolicyBinding.decode_json response.body, ignore_unknown_fields: true
1830
+ catch :response do
1831
+ yield result, operation if block_given?
1832
+ result
1833
+ end
1834
+ end
1835
+
1836
+ ##
1837
+ # Baseline implementation for the list_auto_protection_policy_bindings REST call
1838
+ #
1839
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPolicyBindingsRequest]
1840
+ # A request object representing the call parameters. Required.
1841
+ # @param options [::Gapic::CallOptions]
1842
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1843
+ #
1844
+ # @yield [result, operation] Access the result along with the TransportOperation object
1845
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPolicyBindingsResponse]
1846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1847
+ #
1848
+ # @return [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPolicyBindingsResponse]
1849
+ # A result object deserialized from the server's reply
1850
+ def list_auto_protection_policy_bindings request_pb, options = nil
1851
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1852
+
1853
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_auto_protection_policy_bindings_request request_pb
1854
+ query_string_params = if query_string_params.any?
1855
+ query_string_params.to_h { |p| p.split "=", 2 }
1856
+ else
1857
+ {}
1858
+ end
1859
+
1860
+ response = @client_stub.make_http_request(
1861
+ verb,
1862
+ uri: uri,
1863
+ body: body || "",
1864
+ params: query_string_params,
1865
+ method_name: "list_auto_protection_policy_bindings",
1866
+ options: options
1867
+ )
1868
+ operation = ::Gapic::Rest::TransportOperation.new response
1869
+ result = ::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPolicyBindingsResponse.decode_json response.body, ignore_unknown_fields: true
1870
+ catch :response do
1871
+ yield result, operation if block_given?
1872
+ result
1873
+ end
1874
+ end
1875
+
1876
+ ##
1877
+ # Baseline implementation for the list_applied_auto_protection_policies REST call
1878
+ #
1879
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListAppliedAutoProtectionPoliciesRequest]
1880
+ # A request object representing the call parameters. Required.
1881
+ # @param options [::Gapic::CallOptions]
1882
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1883
+ #
1884
+ # @yield [result, operation] Access the result along with the TransportOperation object
1885
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListAppliedAutoProtectionPoliciesResponse]
1886
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1887
+ #
1888
+ # @return [::Google::Cloud::BackupDR::V1beta::ListAppliedAutoProtectionPoliciesResponse]
1889
+ # A result object deserialized from the server's reply
1890
+ def list_applied_auto_protection_policies request_pb, options = nil
1891
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1892
+
1893
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_applied_auto_protection_policies_request request_pb
1894
+ query_string_params = if query_string_params.any?
1895
+ query_string_params.to_h { |p| p.split "=", 2 }
1896
+ else
1897
+ {}
1898
+ end
1899
+
1900
+ response = @client_stub.make_http_request(
1901
+ verb,
1902
+ uri: uri,
1903
+ body: body || "",
1904
+ params: query_string_params,
1905
+ method_name: "list_applied_auto_protection_policies",
1906
+ options: options
1907
+ )
1908
+ operation = ::Gapic::Rest::TransportOperation.new response
1909
+ result = ::Google::Cloud::BackupDR::V1beta::ListAppliedAutoProtectionPoliciesResponse.decode_json response.body, ignore_unknown_fields: true
1910
+ catch :response do
1911
+ yield result, operation if block_given?
1912
+ result
1913
+ end
1914
+ end
1915
+
1916
+ ##
1917
+ # Baseline implementation for the initiate_delete_auto_protection_policy_binding REST call
1918
+ #
1919
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::InitiateDeleteAutoProtectionPolicyBindingRequest]
1920
+ # A request object representing the call parameters. Required.
1921
+ # @param options [::Gapic::CallOptions]
1922
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1923
+ #
1924
+ # @yield [result, operation] Access the result along with the TransportOperation object
1925
+ # @yieldparam result [::Google::Longrunning::Operation]
1926
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1927
+ #
1928
+ # @return [::Google::Longrunning::Operation]
1929
+ # A result object deserialized from the server's reply
1930
+ def initiate_delete_auto_protection_policy_binding request_pb, options = nil
1931
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1932
+
1933
+ verb, uri, query_string_params, body = ServiceStub.transcode_initiate_delete_auto_protection_policy_binding_request request_pb
1934
+ query_string_params = if query_string_params.any?
1935
+ query_string_params.to_h { |p| p.split "=", 2 }
1936
+ else
1937
+ {}
1938
+ end
1939
+
1940
+ response = @client_stub.make_http_request(
1941
+ verb,
1942
+ uri: uri,
1943
+ body: body || "",
1944
+ params: query_string_params,
1945
+ method_name: "initiate_delete_auto_protection_policy_binding",
1946
+ options: options
1947
+ )
1948
+ operation = ::Gapic::Rest::TransportOperation.new response
1949
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1950
+ catch :response do
1951
+ yield result, operation if block_given?
1952
+ result
1953
+ end
1954
+ end
1955
+
1956
+ ##
1957
+ # Baseline implementation for the get_binding_matching_resource REST call
1958
+ #
1959
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBindingMatchingResourceRequest]
1960
+ # A request object representing the call parameters. Required.
1961
+ # @param options [::Gapic::CallOptions]
1962
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1963
+ #
1964
+ # @yield [result, operation] Access the result along with the TransportOperation object
1965
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::BindingMatchingResource]
1966
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1967
+ #
1968
+ # @return [::Google::Cloud::BackupDR::V1beta::BindingMatchingResource]
1969
+ # A result object deserialized from the server's reply
1970
+ def get_binding_matching_resource request_pb, options = nil
1971
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1972
+
1973
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_binding_matching_resource_request request_pb
1974
+ query_string_params = if query_string_params.any?
1975
+ query_string_params.to_h { |p| p.split "=", 2 }
1976
+ else
1977
+ {}
1978
+ end
1979
+
1980
+ response = @client_stub.make_http_request(
1981
+ verb,
1982
+ uri: uri,
1983
+ body: body || "",
1984
+ params: query_string_params,
1985
+ method_name: "get_binding_matching_resource",
1986
+ options: options
1987
+ )
1988
+ operation = ::Gapic::Rest::TransportOperation.new response
1989
+ result = ::Google::Cloud::BackupDR::V1beta::BindingMatchingResource.decode_json response.body, ignore_unknown_fields: true
1990
+ catch :response do
1991
+ yield result, operation if block_given?
1992
+ result
1993
+ end
1994
+ end
1995
+
1996
+ ##
1997
+ # Baseline implementation for the list_binding_matching_resources REST call
1998
+ #
1999
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBindingMatchingResourcesRequest]
2000
+ # A request object representing the call parameters. Required.
2001
+ # @param options [::Gapic::CallOptions]
2002
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2003
+ #
2004
+ # @yield [result, operation] Access the result along with the TransportOperation object
2005
+ # @yieldparam result [::Google::Cloud::BackupDR::V1beta::ListBindingMatchingResourcesResponse]
2006
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2007
+ #
2008
+ # @return [::Google::Cloud::BackupDR::V1beta::ListBindingMatchingResourcesResponse]
2009
+ # A result object deserialized from the server's reply
2010
+ def list_binding_matching_resources request_pb, options = nil
2011
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2012
+
2013
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_binding_matching_resources_request request_pb
2014
+ query_string_params = if query_string_params.any?
2015
+ query_string_params.to_h { |p| p.split "=", 2 }
2016
+ else
2017
+ {}
2018
+ end
2019
+
2020
+ response = @client_stub.make_http_request(
2021
+ verb,
2022
+ uri: uri,
2023
+ body: body || "",
2024
+ params: query_string_params,
2025
+ method_name: "list_binding_matching_resources",
2026
+ options: options
2027
+ )
2028
+ operation = ::Gapic::Rest::TransportOperation.new response
2029
+ result = ::Google::Cloud::BackupDR::V1beta::ListBindingMatchingResourcesResponse.decode_json response.body, ignore_unknown_fields: true
2030
+ catch :response do
2031
+ yield result, operation if block_given?
2032
+ result
2033
+ end
2034
+ end
2035
+
2036
+ ##
2037
+ # @private
2038
+ #
2039
+ # GRPC transcoding helper method for the list_management_servers REST call
2040
+ #
2041
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListManagementServersRequest]
2042
+ # A request object representing the call parameters. Required.
2043
+ # @return [Array(String, [String, nil], Hash{String => String})]
2044
+ # Uri, Body, Query string parameters
2045
+ def self.transcode_list_management_servers_request request_pb
2046
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2047
+ .with_bindings(
2048
+ uri_method: :get,
2049
+ uri_template: "/v1beta/{parent}/managementServers",
2050
+ matches: [
2051
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2052
+ ]
2053
+ )
2054
+ transcoder.transcode request_pb
2055
+ end
2056
+
2057
+ ##
2058
+ # @private
2059
+ #
2060
+ # GRPC transcoding helper method for the get_management_server REST call
2061
+ #
2062
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetManagementServerRequest]
2063
+ # A request object representing the call parameters. Required.
2064
+ # @return [Array(String, [String, nil], Hash{String => String})]
2065
+ # Uri, Body, Query string parameters
2066
+ def self.transcode_get_management_server_request request_pb
2067
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2068
+ .with_bindings(
2069
+ uri_method: :get,
2070
+ uri_template: "/v1beta/{name}",
2071
+ matches: [
2072
+ ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false]
2073
+ ]
2074
+ )
2075
+ transcoder.transcode request_pb
2076
+ end
2077
+
2078
+ ##
2079
+ # @private
2080
+ #
2081
+ # GRPC transcoding helper method for the create_management_server REST call
2082
+ #
2083
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateManagementServerRequest]
2084
+ # A request object representing the call parameters. Required.
2085
+ # @return [Array(String, [String, nil], Hash{String => String})]
2086
+ # Uri, Body, Query string parameters
2087
+ def self.transcode_create_management_server_request request_pb
2088
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2089
+ .with_bindings(
2090
+ uri_method: :post,
2091
+ uri_template: "/v1beta/{parent}/managementServers",
2092
+ body: "management_server",
2093
+ matches: [
2094
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2095
+ ]
2096
+ )
2097
+ transcoder.transcode request_pb
2098
+ end
2099
+
2100
+ ##
2101
+ # @private
2102
+ #
2103
+ # GRPC transcoding helper method for the delete_management_server REST call
2104
+ #
2105
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteManagementServerRequest]
2106
+ # A request object representing the call parameters. Required.
2107
+ # @return [Array(String, [String, nil], Hash{String => String})]
2108
+ # Uri, Body, Query string parameters
2109
+ def self.transcode_delete_management_server_request request_pb
2110
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2111
+ .with_bindings(
2112
+ uri_method: :delete,
2113
+ uri_template: "/v1beta/{name}",
2114
+ matches: [
2115
+ ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false]
2116
+ ]
2117
+ )
2118
+ transcoder.transcode request_pb
2119
+ end
2120
+
2121
+ ##
2122
+ # @private
2123
+ #
2124
+ # GRPC transcoding helper method for the create_backup_vault REST call
2125
+ #
2126
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateBackupVaultRequest]
2127
+ # A request object representing the call parameters. Required.
2128
+ # @return [Array(String, [String, nil], Hash{String => String})]
2129
+ # Uri, Body, Query string parameters
2130
+ def self.transcode_create_backup_vault_request request_pb
2131
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2132
+ .with_bindings(
2133
+ uri_method: :post,
2134
+ uri_template: "/v1beta/{parent}/backupVaults",
2135
+ body: "backup_vault",
2136
+ matches: [
2137
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2138
+ ]
2139
+ )
2140
+ transcoder.transcode request_pb
2141
+ end
2142
+
2143
+ ##
2144
+ # @private
2145
+ #
2146
+ # GRPC transcoding helper method for the list_backup_vaults REST call
2147
+ #
2148
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupVaultsRequest]
2149
+ # A request object representing the call parameters. Required.
2150
+ # @return [Array(String, [String, nil], Hash{String => String})]
2151
+ # Uri, Body, Query string parameters
2152
+ def self.transcode_list_backup_vaults_request request_pb
2153
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2154
+ .with_bindings(
2155
+ uri_method: :get,
2156
+ uri_template: "/v1beta/{parent}/backupVaults",
2157
+ matches: [
2158
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2159
+ ]
2160
+ )
2161
+ transcoder.transcode request_pb
2162
+ end
2163
+
2164
+ ##
2165
+ # @private
2166
+ #
2167
+ # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call
2168
+ #
2169
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchUsableBackupVaultsRequest]
2170
+ # A request object representing the call parameters. Required.
2171
+ # @return [Array(String, [String, nil], Hash{String => String})]
2172
+ # Uri, Body, Query string parameters
2173
+ def self.transcode_fetch_usable_backup_vaults_request request_pb
2174
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2175
+ .with_bindings(
2176
+ uri_method: :get,
2177
+ uri_template: "/v1beta/{parent}/backupVaults:fetchUsable",
2178
+ matches: [
2179
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2180
+ ]
2181
+ )
2182
+ transcoder.transcode request_pb
2183
+ end
2184
+
2185
+ ##
2186
+ # @private
2187
+ #
2188
+ # GRPC transcoding helper method for the get_backup_vault REST call
2189
+ #
2190
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupVaultRequest]
2191
+ # A request object representing the call parameters. Required.
2192
+ # @return [Array(String, [String, nil], Hash{String => String})]
2193
+ # Uri, Body, Query string parameters
2194
+ def self.transcode_get_backup_vault_request request_pb
2195
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2196
+ .with_bindings(
2197
+ uri_method: :get,
2198
+ uri_template: "/v1beta/{name}",
2199
+ matches: [
2200
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2201
+ ]
2202
+ )
2203
+ transcoder.transcode request_pb
2204
+ end
2205
+
2206
+ ##
2207
+ # @private
2208
+ #
2209
+ # GRPC transcoding helper method for the update_backup_vault REST call
2210
+ #
2211
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupVaultRequest]
2212
+ # A request object representing the call parameters. Required.
2213
+ # @return [Array(String, [String, nil], Hash{String => String})]
2214
+ # Uri, Body, Query string parameters
2215
+ def self.transcode_update_backup_vault_request request_pb
2216
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2217
+ .with_bindings(
2218
+ uri_method: :patch,
2219
+ uri_template: "/v1beta/{backup_vault.name}",
2220
+ body: "backup_vault",
2221
+ matches: [
2222
+ ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2223
+ ]
2224
+ )
2225
+ transcoder.transcode request_pb
2226
+ end
2227
+
2228
+ ##
2229
+ # @private
2230
+ #
2231
+ # GRPC transcoding helper method for the delete_backup_vault REST call
2232
+ #
2233
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupVaultRequest]
2234
+ # A request object representing the call parameters. Required.
2235
+ # @return [Array(String, [String, nil], Hash{String => String})]
2236
+ # Uri, Body, Query string parameters
2237
+ def self.transcode_delete_backup_vault_request request_pb
2238
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2239
+ .with_bindings(
2240
+ uri_method: :delete,
2241
+ uri_template: "/v1beta/{name}",
2242
+ matches: [
2243
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2244
+ ]
2245
+ )
2246
+ transcoder.transcode request_pb
2247
+ end
2248
+
2249
+ ##
2250
+ # @private
2251
+ #
2252
+ # GRPC transcoding helper method for the list_data_sources REST call
2253
+ #
2254
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListDataSourcesRequest]
2255
+ # A request object representing the call parameters. Required.
2256
+ # @return [Array(String, [String, nil], Hash{String => String})]
2257
+ # Uri, Body, Query string parameters
2258
+ def self.transcode_list_data_sources_request request_pb
2259
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2260
+ .with_bindings(
2261
+ uri_method: :get,
2262
+ uri_template: "/v1beta/{parent}/dataSources",
2263
+ matches: [
2264
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2265
+ ]
2266
+ )
2267
+ transcoder.transcode request_pb
2268
+ end
2269
+
2270
+ ##
2271
+ # @private
2272
+ #
2273
+ # GRPC transcoding helper method for the get_data_source REST call
2274
+ #
2275
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetDataSourceRequest]
2276
+ # A request object representing the call parameters. Required.
2277
+ # @return [Array(String, [String, nil], Hash{String => String})]
2278
+ # Uri, Body, Query string parameters
2279
+ def self.transcode_get_data_source_request request_pb
2280
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2281
+ .with_bindings(
2282
+ uri_method: :get,
2283
+ uri_template: "/v1beta/{name}",
2284
+ matches: [
2285
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
2286
+ ]
2287
+ )
2288
+ transcoder.transcode request_pb
2289
+ end
2290
+
2291
+ ##
2292
+ # @private
2293
+ #
2294
+ # GRPC transcoding helper method for the update_data_source REST call
2295
+ #
2296
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateDataSourceRequest]
2297
+ # A request object representing the call parameters. Required.
2298
+ # @return [Array(String, [String, nil], Hash{String => String})]
2299
+ # Uri, Body, Query string parameters
2300
+ def self.transcode_update_data_source_request request_pb
2301
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2302
+ .with_bindings(
2303
+ uri_method: :patch,
2304
+ uri_template: "/v1beta/{data_source.name}",
2305
+ body: "data_source",
2306
+ matches: [
2307
+ ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
2308
+ ]
2309
+ )
2310
+ transcoder.transcode request_pb
2311
+ end
2312
+
2313
+ ##
2314
+ # @private
2315
+ #
2316
+ # GRPC transcoding helper method for the list_backups REST call
2317
+ #
2318
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupsRequest]
2319
+ # A request object representing the call parameters. Required.
2320
+ # @return [Array(String, [String, nil], Hash{String => String})]
2321
+ # Uri, Body, Query string parameters
2322
+ def self.transcode_list_backups_request request_pb
2323
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2324
+ .with_bindings(
2325
+ uri_method: :get,
2326
+ uri_template: "/v1beta/{parent}/backups",
2327
+ matches: [
2328
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
2329
+ ]
2330
+ )
2331
+ transcoder.transcode request_pb
2332
+ end
2333
+
2334
+ ##
2335
+ # @private
2336
+ #
2337
+ # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call
2338
+ #
2339
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchBackupsForResourceTypeRequest]
2340
+ # A request object representing the call parameters. Required.
2341
+ # @return [Array(String, [String, nil], Hash{String => String})]
2342
+ # Uri, Body, Query string parameters
2343
+ def self.transcode_fetch_backups_for_resource_type_request request_pb
2344
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2345
+ .with_bindings(
2346
+ uri_method: :get,
2347
+ uri_template: "/v1beta/{parent}/backups:fetchForResourceType",
2348
+ matches: [
2349
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false]
2350
+ ]
2351
+ )
2352
+ transcoder.transcode request_pb
2353
+ end
2354
+
2355
+ ##
2356
+ # @private
2357
+ #
2358
+ # GRPC transcoding helper method for the get_backup REST call
2359
+ #
2360
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupRequest]
2361
+ # A request object representing the call parameters. Required.
2362
+ # @return [Array(String, [String, nil], Hash{String => String})]
2363
+ # Uri, Body, Query string parameters
2364
+ def self.transcode_get_backup_request request_pb
2365
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2366
+ .with_bindings(
2367
+ uri_method: :get,
2368
+ uri_template: "/v1beta/{name}",
2369
+ matches: [
2370
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
2371
+ ]
2372
+ )
2373
+ transcoder.transcode request_pb
2374
+ end
2375
+
2376
+ ##
2377
+ # @private
2378
+ #
2379
+ # GRPC transcoding helper method for the update_backup REST call
2380
+ #
2381
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupRequest]
2382
+ # A request object representing the call parameters. Required.
2383
+ # @return [Array(String, [String, nil], Hash{String => String})]
2384
+ # Uri, Body, Query string parameters
2385
+ def self.transcode_update_backup_request request_pb
2386
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2387
+ .with_bindings(
2388
+ uri_method: :patch,
2389
+ uri_template: "/v1beta/{backup.name}",
2390
+ body: "backup",
2391
+ matches: [
2392
+ ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
2393
+ ]
2394
+ )
2395
+ transcoder.transcode request_pb
2396
+ end
2397
+
2398
+ ##
2399
+ # @private
2400
+ #
2401
+ # GRPC transcoding helper method for the delete_backup REST call
2402
+ #
2403
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupRequest]
2404
+ # A request object representing the call parameters. Required.
2405
+ # @return [Array(String, [String, nil], Hash{String => String})]
2406
+ # Uri, Body, Query string parameters
2407
+ def self.transcode_delete_backup_request request_pb
2408
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2409
+ .with_bindings(
2410
+ uri_method: :delete,
2411
+ uri_template: "/v1beta/{name}",
2412
+ matches: [
2413
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
2414
+ ]
2415
+ )
2416
+ transcoder.transcode request_pb
2417
+ end
2418
+
2419
+ ##
2420
+ # @private
2421
+ #
2422
+ # GRPC transcoding helper method for the restore_backup REST call
2423
+ #
2424
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::RestoreBackupRequest]
2425
+ # A request object representing the call parameters. Required.
2426
+ # @return [Array(String, [String, nil], Hash{String => String})]
2427
+ # Uri, Body, Query string parameters
2428
+ def self.transcode_restore_backup_request request_pb
2429
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2430
+ .with_bindings(
2431
+ uri_method: :post,
2432
+ uri_template: "/v1beta/{name}:restore",
2433
+ body: "*",
2434
+ matches: [
2435
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false]
2436
+ ]
2437
+ )
2438
+ transcoder.transcode request_pb
2439
+ end
2440
+
2441
+ ##
2442
+ # @private
2443
+ #
2444
+ # GRPC transcoding helper method for the create_backup_plan REST call
2445
+ #
2446
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateBackupPlanRequest]
2447
+ # A request object representing the call parameters. Required.
2448
+ # @return [Array(String, [String, nil], Hash{String => String})]
2449
+ # Uri, Body, Query string parameters
2450
+ def self.transcode_create_backup_plan_request request_pb
2451
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2452
+ .with_bindings(
2453
+ uri_method: :post,
2454
+ uri_template: "/v1beta/{parent}/backupPlans",
2455
+ body: "backup_plan",
2456
+ matches: [
2457
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2458
+ ]
2459
+ )
2460
+ transcoder.transcode request_pb
2461
+ end
2462
+
2463
+ ##
2464
+ # @private
2465
+ #
2466
+ # GRPC transcoding helper method for the update_backup_plan REST call
2467
+ #
2468
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupPlanRequest]
2469
+ # A request object representing the call parameters. Required.
2470
+ # @return [Array(String, [String, nil], Hash{String => String})]
2471
+ # Uri, Body, Query string parameters
2472
+ def self.transcode_update_backup_plan_request request_pb
2473
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2474
+ .with_bindings(
2475
+ uri_method: :patch,
2476
+ uri_template: "/v1beta/{backup_plan.name}",
2477
+ body: "backup_plan",
2478
+ matches: [
2479
+ ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
2480
+ ]
2481
+ )
2482
+ transcoder.transcode request_pb
2483
+ end
2484
+
2485
+ ##
2486
+ # @private
2487
+ #
2488
+ # GRPC transcoding helper method for the get_backup_plan REST call
2489
+ #
2490
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupPlanRequest]
2491
+ # A request object representing the call parameters. Required.
2492
+ # @return [Array(String, [String, nil], Hash{String => String})]
2493
+ # Uri, Body, Query string parameters
2494
+ def self.transcode_get_backup_plan_request request_pb
2495
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2496
+ .with_bindings(
2497
+ uri_method: :get,
2498
+ uri_template: "/v1beta/{name}",
2499
+ matches: [
2500
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
2501
+ ]
2502
+ )
2503
+ transcoder.transcode request_pb
2504
+ end
2505
+
2506
+ ##
2507
+ # @private
2508
+ #
2509
+ # GRPC transcoding helper method for the list_backup_plans REST call
2510
+ #
2511
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupPlansRequest]
2512
+ # A request object representing the call parameters. Required.
2513
+ # @return [Array(String, [String, nil], Hash{String => String})]
2514
+ # Uri, Body, Query string parameters
2515
+ def self.transcode_list_backup_plans_request request_pb
2516
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2517
+ .with_bindings(
2518
+ uri_method: :get,
2519
+ uri_template: "/v1beta/{parent}/backupPlans",
2520
+ matches: [
2521
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2522
+ ]
2523
+ )
2524
+ transcoder.transcode request_pb
2525
+ end
2526
+
2527
+ ##
2528
+ # @private
2529
+ #
2530
+ # GRPC transcoding helper method for the delete_backup_plan REST call
2531
+ #
2532
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupPlanRequest]
2533
+ # A request object representing the call parameters. Required.
2534
+ # @return [Array(String, [String, nil], Hash{String => String})]
2535
+ # Uri, Body, Query string parameters
2536
+ def self.transcode_delete_backup_plan_request request_pb
2537
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2538
+ .with_bindings(
2539
+ uri_method: :delete,
2540
+ uri_template: "/v1beta/{name}",
2541
+ matches: [
2542
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
2543
+ ]
2544
+ )
2545
+ transcoder.transcode request_pb
2546
+ end
2547
+
2548
+ ##
2549
+ # @private
2550
+ #
2551
+ # GRPC transcoding helper method for the get_backup_plan_revision REST call
2552
+ #
2553
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupPlanRevisionRequest]
2554
+ # A request object representing the call parameters. Required.
2555
+ # @return [Array(String, [String, nil], Hash{String => String})]
2556
+ # Uri, Body, Query string parameters
2557
+ def self.transcode_get_backup_plan_revision_request request_pb
2558
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2559
+ .with_bindings(
2560
+ uri_method: :get,
2561
+ uri_template: "/v1beta/{name}",
2562
+ matches: [
2563
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false]
2564
+ ]
2565
+ )
2566
+ transcoder.transcode request_pb
2567
+ end
2568
+
2569
+ ##
2570
+ # @private
2571
+ #
2572
+ # GRPC transcoding helper method for the list_backup_plan_revisions REST call
2573
+ #
2574
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupPlanRevisionsRequest]
2575
+ # A request object representing the call parameters. Required.
2576
+ # @return [Array(String, [String, nil], Hash{String => String})]
2577
+ # Uri, Body, Query string parameters
2578
+ def self.transcode_list_backup_plan_revisions_request request_pb
2579
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2580
+ .with_bindings(
2581
+ uri_method: :get,
2582
+ uri_template: "/v1beta/{parent}/revisions",
2583
+ matches: [
2584
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
2585
+ ]
2586
+ )
2587
+ transcoder.transcode request_pb
2588
+ end
2589
+
2590
+ ##
2591
+ # @private
2592
+ #
2593
+ # GRPC transcoding helper method for the create_backup_plan_association REST call
2594
+ #
2595
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateBackupPlanAssociationRequest]
2596
+ # A request object representing the call parameters. Required.
2597
+ # @return [Array(String, [String, nil], Hash{String => String})]
2598
+ # Uri, Body, Query string parameters
2599
+ def self.transcode_create_backup_plan_association_request request_pb
2600
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2601
+ .with_bindings(
2602
+ uri_method: :post,
2603
+ uri_template: "/v1beta/{parent}/backupPlanAssociations",
2604
+ body: "backup_plan_association",
2605
+ matches: [
2606
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2607
+ ]
2608
+ )
2609
+ transcoder.transcode request_pb
2610
+ end
2611
+
2612
+ ##
2613
+ # @private
2614
+ #
2615
+ # GRPC transcoding helper method for the update_backup_plan_association REST call
2616
+ #
2617
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateBackupPlanAssociationRequest]
2618
+ # A request object representing the call parameters. Required.
2619
+ # @return [Array(String, [String, nil], Hash{String => String})]
2620
+ # Uri, Body, Query string parameters
2621
+ def self.transcode_update_backup_plan_association_request request_pb
2622
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2623
+ .with_bindings(
2624
+ uri_method: :patch,
2625
+ uri_template: "/v1beta/{backup_plan_association.name}",
2626
+ body: "backup_plan_association",
2627
+ matches: [
2628
+ ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
2629
+ ]
2630
+ )
2631
+ transcoder.transcode request_pb
2632
+ end
2633
+
2634
+ ##
2635
+ # @private
2636
+ #
2637
+ # GRPC transcoding helper method for the get_backup_plan_association REST call
2638
+ #
2639
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBackupPlanAssociationRequest]
2640
+ # A request object representing the call parameters. Required.
2641
+ # @return [Array(String, [String, nil], Hash{String => String})]
2642
+ # Uri, Body, Query string parameters
2643
+ def self.transcode_get_backup_plan_association_request request_pb
2644
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2645
+ .with_bindings(
2646
+ uri_method: :get,
2647
+ uri_template: "/v1beta/{name}",
2648
+ matches: [
2649
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
2650
+ ]
2651
+ )
2652
+ transcoder.transcode request_pb
2653
+ end
2654
+
2655
+ ##
2656
+ # @private
2657
+ #
2658
+ # GRPC transcoding helper method for the list_backup_plan_associations REST call
2659
+ #
2660
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBackupPlanAssociationsRequest]
2661
+ # A request object representing the call parameters. Required.
2662
+ # @return [Array(String, [String, nil], Hash{String => String})]
2663
+ # Uri, Body, Query string parameters
2664
+ def self.transcode_list_backup_plan_associations_request request_pb
2665
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2666
+ .with_bindings(
2667
+ uri_method: :get,
2668
+ uri_template: "/v1beta/{parent}/backupPlanAssociations",
2669
+ matches: [
2670
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2671
+ ]
2672
+ )
2673
+ transcoder.transcode request_pb
2674
+ end
2675
+
2676
+ ##
2677
+ # @private
2678
+ #
2679
+ # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call
2680
+ #
2681
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchBackupPlanAssociationsForResourceTypeRequest]
2682
+ # A request object representing the call parameters. Required.
2683
+ # @return [Array(String, [String, nil], Hash{String => String})]
2684
+ # Uri, Body, Query string parameters
2685
+ def self.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb
2686
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2687
+ .with_bindings(
2688
+ uri_method: :get,
2689
+ uri_template: "/v1beta/{parent}/backupPlanAssociations:fetchForResourceType",
2690
+ matches: [
2691
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2692
+ ]
2693
+ )
2694
+ transcoder.transcode request_pb
2695
+ end
2696
+
2697
+ ##
2698
+ # @private
2699
+ #
2700
+ # GRPC transcoding helper method for the delete_backup_plan_association REST call
2701
+ #
2702
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteBackupPlanAssociationRequest]
2703
+ # A request object representing the call parameters. Required.
2704
+ # @return [Array(String, [String, nil], Hash{String => String})]
2705
+ # Uri, Body, Query string parameters
2706
+ def self.transcode_delete_backup_plan_association_request request_pb
2707
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2708
+ .with_bindings(
2709
+ uri_method: :delete,
2710
+ uri_template: "/v1beta/{name}",
2711
+ matches: [
2712
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
2713
+ ]
2714
+ )
2715
+ transcoder.transcode request_pb
2716
+ end
2717
+
2718
+ ##
2719
+ # @private
2720
+ #
2721
+ # GRPC transcoding helper method for the trigger_backup REST call
2722
+ #
2723
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::TriggerBackupRequest]
2724
+ # A request object representing the call parameters. Required.
2725
+ # @return [Array(String, [String, nil], Hash{String => String})]
2726
+ # Uri, Body, Query string parameters
2727
+ def self.transcode_trigger_backup_request request_pb
2728
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2729
+ .with_bindings(
2730
+ uri_method: :post,
2731
+ uri_template: "/v1beta/{name}:triggerBackup",
2732
+ body: "*",
2733
+ matches: [
2734
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false]
2735
+ ]
2736
+ )
2737
+ transcoder.transcode request_pb
2738
+ end
2739
+
2740
+ ##
2741
+ # @private
2742
+ #
2743
+ # GRPC transcoding helper method for the get_data_source_reference REST call
2744
+ #
2745
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetDataSourceReferenceRequest]
2746
+ # A request object representing the call parameters. Required.
2747
+ # @return [Array(String, [String, nil], Hash{String => String})]
2748
+ # Uri, Body, Query string parameters
2749
+ def self.transcode_get_data_source_reference_request request_pb
2750
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2751
+ .with_bindings(
2752
+ uri_method: :get,
2753
+ uri_template: "/v1beta/{name}",
2754
+ matches: [
2755
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false]
2756
+ ]
2757
+ )
2758
+ transcoder.transcode request_pb
2759
+ end
2760
+
2761
+ ##
2762
+ # @private
2763
+ #
2764
+ # GRPC transcoding helper method for the list_data_source_references REST call
2765
+ #
2766
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListDataSourceReferencesRequest]
2767
+ # A request object representing the call parameters. Required.
2768
+ # @return [Array(String, [String, nil], Hash{String => String})]
2769
+ # Uri, Body, Query string parameters
2770
+ def self.transcode_list_data_source_references_request request_pb
2771
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2772
+ .with_bindings(
2773
+ uri_method: :get,
2774
+ uri_template: "/v1beta/{parent}/dataSourceReferences",
2775
+ matches: [
2776
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2777
+ ]
2778
+ )
2779
+ transcoder.transcode request_pb
2780
+ end
2781
+
2782
+ ##
2783
+ # @private
2784
+ #
2785
+ # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call
2786
+ #
2787
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::FetchDataSourceReferencesForResourceTypeRequest]
2788
+ # A request object representing the call parameters. Required.
2789
+ # @return [Array(String, [String, nil], Hash{String => String})]
2790
+ # Uri, Body, Query string parameters
2791
+ def self.transcode_fetch_data_source_references_for_resource_type_request request_pb
2792
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2793
+ .with_bindings(
2794
+ uri_method: :get,
2795
+ uri_template: "/v1beta/{parent}/dataSourceReferences:fetchForResourceType",
2796
+ matches: [
2797
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2798
+ ]
2799
+ )
2800
+ transcoder.transcode request_pb
2801
+ end
2802
+
2803
+ ##
2804
+ # @private
2805
+ #
2806
+ # GRPC transcoding helper method for the initialize_service REST call
2807
+ #
2808
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::InitializeServiceRequest]
2809
+ # A request object representing the call parameters. Required.
2810
+ # @return [Array(String, [String, nil], Hash{String => String})]
2811
+ # Uri, Body, Query string parameters
2812
+ def self.transcode_initialize_service_request request_pb
2813
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2814
+ .with_bindings(
2815
+ uri_method: :post,
2816
+ uri_template: "/v1beta/{name}:initialize",
2817
+ body: "*",
2818
+ matches: [
2819
+ ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false]
2820
+ ]
2821
+ )
2822
+ transcoder.transcode request_pb
2823
+ end
2824
+
2825
+ ##
2826
+ # @private
2827
+ #
2828
+ # GRPC transcoding helper method for the create_auto_protection_policy REST call
2829
+ #
2830
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateAutoProtectionPolicyRequest]
2831
+ # A request object representing the call parameters. Required.
2832
+ # @return [Array(String, [String, nil], Hash{String => String})]
2833
+ # Uri, Body, Query string parameters
2834
+ def self.transcode_create_auto_protection_policy_request request_pb
2835
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2836
+ .with_bindings(
2837
+ uri_method: :post,
2838
+ uri_template: "/v1beta/{parent}/autoProtectionPolicies",
2839
+ body: "auto_protection_policy",
2840
+ matches: [
2841
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2842
+ ]
2843
+ )
2844
+ transcoder.transcode request_pb
2845
+ end
2846
+
2847
+ ##
2848
+ # @private
2849
+ #
2850
+ # GRPC transcoding helper method for the list_auto_protection_policies REST call
2851
+ #
2852
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPoliciesRequest]
2853
+ # A request object representing the call parameters. Required.
2854
+ # @return [Array(String, [String, nil], Hash{String => String})]
2855
+ # Uri, Body, Query string parameters
2856
+ def self.transcode_list_auto_protection_policies_request request_pb
2857
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2858
+ .with_bindings(
2859
+ uri_method: :get,
2860
+ uri_template: "/v1beta/{parent}/autoProtectionPolicies",
2861
+ matches: [
2862
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2863
+ ]
2864
+ )
2865
+ transcoder.transcode request_pb
2866
+ end
2867
+
2868
+ ##
2869
+ # @private
2870
+ #
2871
+ # GRPC transcoding helper method for the get_auto_protection_policy REST call
2872
+ #
2873
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetAutoProtectionPolicyRequest]
2874
+ # A request object representing the call parameters. Required.
2875
+ # @return [Array(String, [String, nil], Hash{String => String})]
2876
+ # Uri, Body, Query string parameters
2877
+ def self.transcode_get_auto_protection_policy_request request_pb
2878
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2879
+ .with_bindings(
2880
+ uri_method: :get,
2881
+ uri_template: "/v1beta/{name}",
2882
+ matches: [
2883
+ ["name", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/?$}, false]
2884
+ ]
2885
+ )
2886
+ transcoder.transcode request_pb
2887
+ end
2888
+
2889
+ ##
2890
+ # @private
2891
+ #
2892
+ # GRPC transcoding helper method for the update_auto_protection_policy REST call
2893
+ #
2894
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::UpdateAutoProtectionPolicyRequest]
2895
+ # A request object representing the call parameters. Required.
2896
+ # @return [Array(String, [String, nil], Hash{String => String})]
2897
+ # Uri, Body, Query string parameters
2898
+ def self.transcode_update_auto_protection_policy_request request_pb
2899
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2900
+ .with_bindings(
2901
+ uri_method: :patch,
2902
+ uri_template: "/v1beta/{auto_protection_policy.name}",
2903
+ body: "auto_protection_policy",
2904
+ matches: [
2905
+ ["auto_protection_policy.name", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/?$}, false]
2906
+ ]
2907
+ )
2908
+ transcoder.transcode request_pb
2909
+ end
2910
+
2911
+ ##
2912
+ # @private
2913
+ #
2914
+ # GRPC transcoding helper method for the delete_auto_protection_policy REST call
2915
+ #
2916
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::DeleteAutoProtectionPolicyRequest]
2917
+ # A request object representing the call parameters. Required.
2918
+ # @return [Array(String, [String, nil], Hash{String => String})]
2919
+ # Uri, Body, Query string parameters
2920
+ def self.transcode_delete_auto_protection_policy_request request_pb
2921
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2922
+ .with_bindings(
2923
+ uri_method: :delete,
2924
+ uri_template: "/v1beta/{name}",
2925
+ matches: [
2926
+ ["name", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/?$}, false]
2927
+ ]
2928
+ )
2929
+ transcoder.transcode request_pb
2930
+ end
2931
+
2932
+ ##
2933
+ # @private
2934
+ #
2935
+ # GRPC transcoding helper method for the create_auto_protection_policy_binding REST call
2936
+ #
2937
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::CreateAutoProtectionPolicyBindingRequest]
2938
+ # A request object representing the call parameters. Required.
2939
+ # @return [Array(String, [String, nil], Hash{String => String})]
2940
+ # Uri, Body, Query string parameters
2941
+ def self.transcode_create_auto_protection_policy_binding_request request_pb
2942
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2943
+ .with_bindings(
2944
+ uri_method: :post,
2945
+ uri_template: "/v1beta/{parent}/bindings",
2946
+ body: "auto_protection_policy_binding",
2947
+ matches: [
2948
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/?$}, false]
2949
+ ]
2950
+ )
2951
+ transcoder.transcode request_pb
2952
+ end
2953
+
2954
+ ##
2955
+ # @private
2956
+ #
2957
+ # GRPC transcoding helper method for the get_auto_protection_policy_binding REST call
2958
+ #
2959
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetAutoProtectionPolicyBindingRequest]
2960
+ # A request object representing the call parameters. Required.
2961
+ # @return [Array(String, [String, nil], Hash{String => String})]
2962
+ # Uri, Body, Query string parameters
2963
+ def self.transcode_get_auto_protection_policy_binding_request request_pb
2964
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2965
+ .with_bindings(
2966
+ uri_method: :get,
2967
+ uri_template: "/v1beta/{name}",
2968
+ matches: [
2969
+ ["name", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/bindings/[^/]+/?$}, false]
2970
+ ]
2971
+ )
2972
+ transcoder.transcode request_pb
2973
+ end
2974
+
2975
+ ##
2976
+ # @private
2977
+ #
2978
+ # GRPC transcoding helper method for the list_auto_protection_policy_bindings REST call
2979
+ #
2980
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListAutoProtectionPolicyBindingsRequest]
2981
+ # A request object representing the call parameters. Required.
2982
+ # @return [Array(String, [String, nil], Hash{String => String})]
2983
+ # Uri, Body, Query string parameters
2984
+ def self.transcode_list_auto_protection_policy_bindings_request request_pb
2985
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2986
+ .with_bindings(
2987
+ uri_method: :get,
2988
+ uri_template: "/v1beta/{parent}/bindings",
2989
+ matches: [
2990
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/?$}, false]
2991
+ ]
2992
+ )
2993
+ transcoder.transcode request_pb
2994
+ end
2995
+
2996
+ ##
2997
+ # @private
2998
+ #
2999
+ # GRPC transcoding helper method for the list_applied_auto_protection_policies REST call
3000
+ #
3001
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListAppliedAutoProtectionPoliciesRequest]
3002
+ # A request object representing the call parameters. Required.
3003
+ # @return [Array(String, [String, nil], Hash{String => String})]
3004
+ # Uri, Body, Query string parameters
3005
+ def self.transcode_list_applied_auto_protection_policies_request request_pb
3006
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3007
+ .with_bindings(
3008
+ uri_method: :get,
3009
+ uri_template: "/v1beta/{parent}/appliedAutoProtectionPolicies",
3010
+ matches: [
3011
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3012
+ ]
3013
+ )
3014
+ transcoder.transcode request_pb
3015
+ end
3016
+
3017
+ ##
3018
+ # @private
3019
+ #
3020
+ # GRPC transcoding helper method for the initiate_delete_auto_protection_policy_binding REST call
3021
+ #
3022
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::InitiateDeleteAutoProtectionPolicyBindingRequest]
3023
+ # A request object representing the call parameters. Required.
3024
+ # @return [Array(String, [String, nil], Hash{String => String})]
3025
+ # Uri, Body, Query string parameters
3026
+ def self.transcode_initiate_delete_auto_protection_policy_binding_request request_pb
3027
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3028
+ .with_bindings(
3029
+ uri_method: :post,
3030
+ uri_template: "/v1beta/{name}:initiateDelete",
3031
+ body: "*",
3032
+ matches: [
3033
+ ["name", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/bindings/[^/]+/?$}, false]
3034
+ ]
3035
+ )
3036
+ transcoder.transcode request_pb
3037
+ end
3038
+
3039
+ ##
3040
+ # @private
3041
+ #
3042
+ # GRPC transcoding helper method for the get_binding_matching_resource REST call
3043
+ #
3044
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::GetBindingMatchingResourceRequest]
3045
+ # A request object representing the call parameters. Required.
3046
+ # @return [Array(String, [String, nil], Hash{String => String})]
3047
+ # Uri, Body, Query string parameters
3048
+ def self.transcode_get_binding_matching_resource_request request_pb
3049
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3050
+ .with_bindings(
3051
+ uri_method: :get,
3052
+ uri_template: "/v1beta/{name}",
3053
+ matches: [
3054
+ ["name", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/bindings/[^/]+/matchingResources/[^/]+/?$}, false]
3055
+ ]
3056
+ )
3057
+ transcoder.transcode request_pb
3058
+ end
3059
+
3060
+ ##
3061
+ # @private
3062
+ #
3063
+ # GRPC transcoding helper method for the list_binding_matching_resources REST call
3064
+ #
3065
+ # @param request_pb [::Google::Cloud::BackupDR::V1beta::ListBindingMatchingResourcesRequest]
3066
+ # A request object representing the call parameters. Required.
3067
+ # @return [Array(String, [String, nil], Hash{String => String})]
3068
+ # Uri, Body, Query string parameters
3069
+ def self.transcode_list_binding_matching_resources_request request_pb
3070
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3071
+ .with_bindings(
3072
+ uri_method: :get,
3073
+ uri_template: "/v1beta/{parent}/matchingResources",
3074
+ matches: [
3075
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/autoProtectionPolicies/[^/]+/bindings/[^/]+/?$}, false]
3076
+ ]
3077
+ )
3078
+ transcoder.transcode request_pb
3079
+ end
3080
+ end
3081
+ end
3082
+ end
3083
+ end
3084
+ end
3085
+ end
3086
+ end