google-cloud-netapp-v1 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/netapp/v1/netapp/client.rb +72 -55
- data/lib/google/cloud/netapp/v1/netapp/operations.rb +9 -5
- data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +63 -55
- data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +40 -28
- data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +446 -326
- data/lib/google/cloud/netapp/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- metadata +5 -5
@@ -314,15 +314,27 @@ module Google
|
|
314
314
|
endpoint: @config.endpoint,
|
315
315
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
316
316
|
universe_domain: @config.universe_domain,
|
317
|
-
credentials: credentials
|
317
|
+
credentials: credentials,
|
318
|
+
logger: @config.logger
|
318
319
|
)
|
319
320
|
|
321
|
+
@net_app_stub.logger(stub: true)&.info do |entry|
|
322
|
+
entry.set_system_name
|
323
|
+
entry.set_service
|
324
|
+
entry.message = "Created client for #{entry.service}"
|
325
|
+
entry.set_credentials_fields credentials
|
326
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
327
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
328
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
329
|
+
end
|
330
|
+
|
320
331
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
321
332
|
config.credentials = credentials
|
322
333
|
config.quota_project = @quota_project_id
|
323
334
|
config.endpoint = @net_app_stub.endpoint
|
324
335
|
config.universe_domain = @net_app_stub.universe_domain
|
325
336
|
config.bindings_override = @config.bindings_override
|
337
|
+
config.logger = @net_app_stub.logger if config.respond_to? :logger=
|
326
338
|
end
|
327
339
|
end
|
328
340
|
|
@@ -340,6 +352,15 @@ module Google
|
|
340
352
|
#
|
341
353
|
attr_reader :location_client
|
342
354
|
|
355
|
+
##
|
356
|
+
# The logger used for request/response debug logging.
|
357
|
+
#
|
358
|
+
# @return [Logger]
|
359
|
+
#
|
360
|
+
def logger
|
361
|
+
@net_app_stub.logger
|
362
|
+
end
|
363
|
+
|
343
364
|
# Service calls
|
344
365
|
|
345
366
|
##
|
@@ -429,7 +450,6 @@ module Google
|
|
429
450
|
|
430
451
|
@net_app_stub.list_storage_pools request, options do |result, operation|
|
431
452
|
yield result, operation if block_given?
|
432
|
-
return result
|
433
453
|
end
|
434
454
|
rescue ::Gapic::Rest::Error => e
|
435
455
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -523,7 +543,7 @@ module Google
|
|
523
543
|
@net_app_stub.create_storage_pool request, options do |result, operation|
|
524
544
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
525
545
|
yield result, operation if block_given?
|
526
|
-
|
546
|
+
throw :response, result
|
527
547
|
end
|
528
548
|
rescue ::Gapic::Rest::Error => e
|
529
549
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -602,7 +622,6 @@ module Google
|
|
602
622
|
|
603
623
|
@net_app_stub.get_storage_pool request, options do |result, operation|
|
604
624
|
yield result, operation if block_given?
|
605
|
-
return result
|
606
625
|
end
|
607
626
|
rescue ::Gapic::Rest::Error => e
|
608
627
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -695,7 +714,7 @@ module Google
|
|
695
714
|
@net_app_stub.update_storage_pool request, options do |result, operation|
|
696
715
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
697
716
|
yield result, operation if block_given?
|
698
|
-
|
717
|
+
throw :response, result
|
699
718
|
end
|
700
719
|
rescue ::Gapic::Rest::Error => e
|
701
720
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -782,7 +801,7 @@ module Google
|
|
782
801
|
@net_app_stub.delete_storage_pool request, options do |result, operation|
|
783
802
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
784
803
|
yield result, operation if block_given?
|
785
|
-
|
804
|
+
throw :response, result
|
786
805
|
end
|
787
806
|
rescue ::Gapic::Rest::Error => e
|
788
807
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -870,7 +889,7 @@ module Google
|
|
870
889
|
@net_app_stub.switch_active_replica_zone request, options do |result, operation|
|
871
890
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
872
891
|
yield result, operation if block_given?
|
873
|
-
|
892
|
+
throw :response, result
|
874
893
|
end
|
875
894
|
rescue ::Gapic::Rest::Error => e
|
876
895
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -962,7 +981,6 @@ module Google
|
|
962
981
|
|
963
982
|
@net_app_stub.list_volumes request, options do |result, operation|
|
964
983
|
yield result, operation if block_given?
|
965
|
-
return result
|
966
984
|
end
|
967
985
|
rescue ::Gapic::Rest::Error => e
|
968
986
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1041,7 +1059,6 @@ module Google
|
|
1041
1059
|
|
1042
1060
|
@net_app_stub.get_volume request, options do |result, operation|
|
1043
1061
|
yield result, operation if block_given?
|
1044
|
-
return result
|
1045
1062
|
end
|
1046
1063
|
rescue ::Gapic::Rest::Error => e
|
1047
1064
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1135,7 +1152,7 @@ module Google
|
|
1135
1152
|
@net_app_stub.create_volume request, options do |result, operation|
|
1136
1153
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1137
1154
|
yield result, operation if block_given?
|
1138
|
-
|
1155
|
+
throw :response, result
|
1139
1156
|
end
|
1140
1157
|
rescue ::Gapic::Rest::Error => e
|
1141
1158
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1228,7 +1245,7 @@ module Google
|
|
1228
1245
|
@net_app_stub.update_volume request, options do |result, operation|
|
1229
1246
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1230
1247
|
yield result, operation if block_given?
|
1231
|
-
|
1248
|
+
throw :response, result
|
1232
1249
|
end
|
1233
1250
|
rescue ::Gapic::Rest::Error => e
|
1234
1251
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1319,7 +1336,7 @@ module Google
|
|
1319
1336
|
@net_app_stub.delete_volume request, options do |result, operation|
|
1320
1337
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1321
1338
|
yield result, operation if block_given?
|
1322
|
-
|
1339
|
+
throw :response, result
|
1323
1340
|
end
|
1324
1341
|
rescue ::Gapic::Rest::Error => e
|
1325
1342
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1413,7 +1430,7 @@ module Google
|
|
1413
1430
|
@net_app_stub.revert_volume request, options do |result, operation|
|
1414
1431
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1415
1432
|
yield result, operation if block_given?
|
1416
|
-
|
1433
|
+
throw :response, result
|
1417
1434
|
end
|
1418
1435
|
rescue ::Gapic::Rest::Error => e
|
1419
1436
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1507,7 +1524,6 @@ module Google
|
|
1507
1524
|
|
1508
1525
|
@net_app_stub.list_snapshots request, options do |result, operation|
|
1509
1526
|
yield result, operation if block_given?
|
1510
|
-
return result
|
1511
1527
|
end
|
1512
1528
|
rescue ::Gapic::Rest::Error => e
|
1513
1529
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1587,7 +1603,6 @@ module Google
|
|
1587
1603
|
|
1588
1604
|
@net_app_stub.get_snapshot request, options do |result, operation|
|
1589
1605
|
yield result, operation if block_given?
|
1590
|
-
return result
|
1591
1606
|
end
|
1592
1607
|
rescue ::Gapic::Rest::Error => e
|
1593
1608
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1682,7 +1697,7 @@ module Google
|
|
1682
1697
|
@net_app_stub.create_snapshot request, options do |result, operation|
|
1683
1698
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1684
1699
|
yield result, operation if block_given?
|
1685
|
-
|
1700
|
+
throw :response, result
|
1686
1701
|
end
|
1687
1702
|
rescue ::Gapic::Rest::Error => e
|
1688
1703
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1770,7 +1785,7 @@ module Google
|
|
1770
1785
|
@net_app_stub.delete_snapshot request, options do |result, operation|
|
1771
1786
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1772
1787
|
yield result, operation if block_given?
|
1773
|
-
|
1788
|
+
throw :response, result
|
1774
1789
|
end
|
1775
1790
|
rescue ::Gapic::Rest::Error => e
|
1776
1791
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1860,7 +1875,7 @@ module Google
|
|
1860
1875
|
@net_app_stub.update_snapshot request, options do |result, operation|
|
1861
1876
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1862
1877
|
yield result, operation if block_given?
|
1863
|
-
|
1878
|
+
throw :response, result
|
1864
1879
|
end
|
1865
1880
|
rescue ::Gapic::Rest::Error => e
|
1866
1881
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1952,7 +1967,6 @@ module Google
|
|
1952
1967
|
|
1953
1968
|
@net_app_stub.list_active_directories request, options do |result, operation|
|
1954
1969
|
yield result, operation if block_given?
|
1955
|
-
return result
|
1956
1970
|
end
|
1957
1971
|
rescue ::Gapic::Rest::Error => e
|
1958
1972
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2031,7 +2045,6 @@ module Google
|
|
2031
2045
|
|
2032
2046
|
@net_app_stub.get_active_directory request, options do |result, operation|
|
2033
2047
|
yield result, operation if block_given?
|
2034
|
-
return result
|
2035
2048
|
end
|
2036
2049
|
rescue ::Gapic::Rest::Error => e
|
2037
2050
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2126,7 +2139,7 @@ module Google
|
|
2126
2139
|
@net_app_stub.create_active_directory request, options do |result, operation|
|
2127
2140
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2128
2141
|
yield result, operation if block_given?
|
2129
|
-
|
2142
|
+
throw :response, result
|
2130
2143
|
end
|
2131
2144
|
rescue ::Gapic::Rest::Error => e
|
2132
2145
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2219,7 +2232,7 @@ module Google
|
|
2219
2232
|
@net_app_stub.update_active_directory request, options do |result, operation|
|
2220
2233
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2221
2234
|
yield result, operation if block_given?
|
2222
|
-
|
2235
|
+
throw :response, result
|
2223
2236
|
end
|
2224
2237
|
rescue ::Gapic::Rest::Error => e
|
2225
2238
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2306,7 +2319,7 @@ module Google
|
|
2306
2319
|
@net_app_stub.delete_active_directory request, options do |result, operation|
|
2307
2320
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2308
2321
|
yield result, operation if block_given?
|
2309
|
-
|
2322
|
+
throw :response, result
|
2310
2323
|
end
|
2311
2324
|
rescue ::Gapic::Rest::Error => e
|
2312
2325
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2398,7 +2411,6 @@ module Google
|
|
2398
2411
|
|
2399
2412
|
@net_app_stub.list_kms_configs request, options do |result, operation|
|
2400
2413
|
yield result, operation if block_given?
|
2401
|
-
return result
|
2402
2414
|
end
|
2403
2415
|
rescue ::Gapic::Rest::Error => e
|
2404
2416
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2492,7 +2504,7 @@ module Google
|
|
2492
2504
|
@net_app_stub.create_kms_config request, options do |result, operation|
|
2493
2505
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2494
2506
|
yield result, operation if block_given?
|
2495
|
-
|
2507
|
+
throw :response, result
|
2496
2508
|
end
|
2497
2509
|
rescue ::Gapic::Rest::Error => e
|
2498
2510
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2571,7 +2583,6 @@ module Google
|
|
2571
2583
|
|
2572
2584
|
@net_app_stub.get_kms_config request, options do |result, operation|
|
2573
2585
|
yield result, operation if block_given?
|
2574
|
-
return result
|
2575
2586
|
end
|
2576
2587
|
rescue ::Gapic::Rest::Error => e
|
2577
2588
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2664,7 +2675,7 @@ module Google
|
|
2664
2675
|
@net_app_stub.update_kms_config request, options do |result, operation|
|
2665
2676
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2666
2677
|
yield result, operation if block_given?
|
2667
|
-
|
2678
|
+
throw :response, result
|
2668
2679
|
end
|
2669
2680
|
rescue ::Gapic::Rest::Error => e
|
2670
2681
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2752,7 +2763,7 @@ module Google
|
|
2752
2763
|
@net_app_stub.encrypt_volumes request, options do |result, operation|
|
2753
2764
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2754
2765
|
yield result, operation if block_given?
|
2755
|
-
|
2766
|
+
throw :response, result
|
2756
2767
|
end
|
2757
2768
|
rescue ::Gapic::Rest::Error => e
|
2758
2769
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2831,7 +2842,6 @@ module Google
|
|
2831
2842
|
|
2832
2843
|
@net_app_stub.verify_kms_config request, options do |result, operation|
|
2833
2844
|
yield result, operation if block_given?
|
2834
|
-
return result
|
2835
2845
|
end
|
2836
2846
|
rescue ::Gapic::Rest::Error => e
|
2837
2847
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2918,7 +2928,7 @@ module Google
|
|
2918
2928
|
@net_app_stub.delete_kms_config request, options do |result, operation|
|
2919
2929
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2920
2930
|
yield result, operation if block_given?
|
2921
|
-
|
2931
|
+
throw :response, result
|
2922
2932
|
end
|
2923
2933
|
rescue ::Gapic::Rest::Error => e
|
2924
2934
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3012,7 +3022,6 @@ module Google
|
|
3012
3022
|
|
3013
3023
|
@net_app_stub.list_replications request, options do |result, operation|
|
3014
3024
|
yield result, operation if block_given?
|
3015
|
-
return result
|
3016
3025
|
end
|
3017
3026
|
rescue ::Gapic::Rest::Error => e
|
3018
3027
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3092,7 +3101,6 @@ module Google
|
|
3092
3101
|
|
3093
3102
|
@net_app_stub.get_replication request, options do |result, operation|
|
3094
3103
|
yield result, operation if block_given?
|
3095
|
-
return result
|
3096
3104
|
end
|
3097
3105
|
rescue ::Gapic::Rest::Error => e
|
3098
3106
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3187,7 +3195,7 @@ module Google
|
|
3187
3195
|
@net_app_stub.create_replication request, options do |result, operation|
|
3188
3196
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3189
3197
|
yield result, operation if block_given?
|
3190
|
-
|
3198
|
+
throw :response, result
|
3191
3199
|
end
|
3192
3200
|
rescue ::Gapic::Rest::Error => e
|
3193
3201
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3275,7 +3283,7 @@ module Google
|
|
3275
3283
|
@net_app_stub.delete_replication request, options do |result, operation|
|
3276
3284
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3277
3285
|
yield result, operation if block_given?
|
3278
|
-
|
3286
|
+
throw :response, result
|
3279
3287
|
end
|
3280
3288
|
rescue ::Gapic::Rest::Error => e
|
3281
3289
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3365,7 +3373,7 @@ module Google
|
|
3365
3373
|
@net_app_stub.update_replication request, options do |result, operation|
|
3366
3374
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3367
3375
|
yield result, operation if block_given?
|
3368
|
-
|
3376
|
+
throw :response, result
|
3369
3377
|
end
|
3370
3378
|
rescue ::Gapic::Rest::Error => e
|
3371
3379
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3460,7 +3468,7 @@ module Google
|
|
3460
3468
|
@net_app_stub.stop_replication request, options do |result, operation|
|
3461
3469
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3462
3470
|
yield result, operation if block_given?
|
3463
|
-
|
3471
|
+
throw :response, result
|
3464
3472
|
end
|
3465
3473
|
rescue ::Gapic::Rest::Error => e
|
3466
3474
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3548,7 +3556,7 @@ module Google
|
|
3548
3556
|
@net_app_stub.resume_replication request, options do |result, operation|
|
3549
3557
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3550
3558
|
yield result, operation if block_given?
|
3551
|
-
|
3559
|
+
throw :response, result
|
3552
3560
|
end
|
3553
3561
|
rescue ::Gapic::Rest::Error => e
|
3554
3562
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3637,7 +3645,7 @@ module Google
|
|
3637
3645
|
@net_app_stub.reverse_replication_direction request, options do |result, operation|
|
3638
3646
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3639
3647
|
yield result, operation if block_given?
|
3640
|
-
|
3648
|
+
throw :response, result
|
3641
3649
|
end
|
3642
3650
|
rescue ::Gapic::Rest::Error => e
|
3643
3651
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3736,7 +3744,7 @@ module Google
|
|
3736
3744
|
@net_app_stub.establish_peering request, options do |result, operation|
|
3737
3745
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3738
3746
|
yield result, operation if block_given?
|
3739
|
-
|
3747
|
+
throw :response, result
|
3740
3748
|
end
|
3741
3749
|
rescue ::Gapic::Rest::Error => e
|
3742
3750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3825,7 +3833,7 @@ module Google
|
|
3825
3833
|
@net_app_stub.sync_replication request, options do |result, operation|
|
3826
3834
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3827
3835
|
yield result, operation if block_given?
|
3828
|
-
|
3836
|
+
throw :response, result
|
3829
3837
|
end
|
3830
3838
|
rescue ::Gapic::Rest::Error => e
|
3831
3839
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3921,7 +3929,7 @@ module Google
|
|
3921
3929
|
@net_app_stub.create_backup_vault request, options do |result, operation|
|
3922
3930
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3923
3931
|
yield result, operation if block_given?
|
3924
|
-
|
3932
|
+
throw :response, result
|
3925
3933
|
end
|
3926
3934
|
rescue ::Gapic::Rest::Error => e
|
3927
3935
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4001,7 +4009,6 @@ module Google
|
|
4001
4009
|
|
4002
4010
|
@net_app_stub.get_backup_vault request, options do |result, operation|
|
4003
4011
|
yield result, operation if block_given?
|
4004
|
-
return result
|
4005
4012
|
end
|
4006
4013
|
rescue ::Gapic::Rest::Error => e
|
4007
4014
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4095,7 +4102,6 @@ module Google
|
|
4095
4102
|
|
4096
4103
|
@net_app_stub.list_backup_vaults request, options do |result, operation|
|
4097
4104
|
yield result, operation if block_given?
|
4098
|
-
return result
|
4099
4105
|
end
|
4100
4106
|
rescue ::Gapic::Rest::Error => e
|
4101
4107
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4188,7 +4194,7 @@ module Google
|
|
4188
4194
|
@net_app_stub.update_backup_vault request, options do |result, operation|
|
4189
4195
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4190
4196
|
yield result, operation if block_given?
|
4191
|
-
|
4197
|
+
throw :response, result
|
4192
4198
|
end
|
4193
4199
|
rescue ::Gapic::Rest::Error => e
|
4194
4200
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4276,7 +4282,7 @@ module Google
|
|
4276
4282
|
@net_app_stub.delete_backup_vault request, options do |result, operation|
|
4277
4283
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4278
4284
|
yield result, operation if block_given?
|
4279
|
-
|
4285
|
+
throw :response, result
|
4280
4286
|
end
|
4281
4287
|
rescue ::Gapic::Rest::Error => e
|
4282
4288
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4375,7 +4381,7 @@ module Google
|
|
4375
4381
|
@net_app_stub.create_backup request, options do |result, operation|
|
4376
4382
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4377
4383
|
yield result, operation if block_given?
|
4378
|
-
|
4384
|
+
throw :response, result
|
4379
4385
|
end
|
4380
4386
|
rescue ::Gapic::Rest::Error => e
|
4381
4387
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4455,7 +4461,6 @@ module Google
|
|
4455
4461
|
|
4456
4462
|
@net_app_stub.get_backup request, options do |result, operation|
|
4457
4463
|
yield result, operation if block_given?
|
4458
|
-
return result
|
4459
4464
|
end
|
4460
4465
|
rescue ::Gapic::Rest::Error => e
|
4461
4466
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4560,7 +4565,6 @@ module Google
|
|
4560
4565
|
|
4561
4566
|
@net_app_stub.list_backups request, options do |result, operation|
|
4562
4567
|
yield result, operation if block_given?
|
4563
|
-
return result
|
4564
4568
|
end
|
4565
4569
|
rescue ::Gapic::Rest::Error => e
|
4566
4570
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4648,7 +4652,7 @@ module Google
|
|
4648
4652
|
@net_app_stub.delete_backup request, options do |result, operation|
|
4649
4653
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4650
4654
|
yield result, operation if block_given?
|
4651
|
-
|
4655
|
+
throw :response, result
|
4652
4656
|
end
|
4653
4657
|
rescue ::Gapic::Rest::Error => e
|
4654
4658
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4741,7 +4745,7 @@ module Google
|
|
4741
4745
|
@net_app_stub.update_backup request, options do |result, operation|
|
4742
4746
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4743
4747
|
yield result, operation if block_given?
|
4744
|
-
|
4748
|
+
throw :response, result
|
4745
4749
|
end
|
4746
4750
|
rescue ::Gapic::Rest::Error => e
|
4747
4751
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4837,7 +4841,7 @@ module Google
|
|
4837
4841
|
@net_app_stub.create_backup_policy request, options do |result, operation|
|
4838
4842
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4839
4843
|
yield result, operation if block_given?
|
4840
|
-
|
4844
|
+
throw :response, result
|
4841
4845
|
end
|
4842
4846
|
rescue ::Gapic::Rest::Error => e
|
4843
4847
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4917,7 +4921,6 @@ module Google
|
|
4917
4921
|
|
4918
4922
|
@net_app_stub.get_backup_policy request, options do |result, operation|
|
4919
4923
|
yield result, operation if block_given?
|
4920
|
-
return result
|
4921
4924
|
end
|
4922
4925
|
rescue ::Gapic::Rest::Error => e
|
4923
4926
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5009,7 +5012,6 @@ module Google
|
|
5009
5012
|
|
5010
5013
|
@net_app_stub.list_backup_policies request, options do |result, operation|
|
5011
5014
|
yield result, operation if block_given?
|
5012
|
-
return result
|
5013
5015
|
end
|
5014
5016
|
rescue ::Gapic::Rest::Error => e
|
5015
5017
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5102,7 +5104,7 @@ module Google
|
|
5102
5104
|
@net_app_stub.update_backup_policy request, options do |result, operation|
|
5103
5105
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
5104
5106
|
yield result, operation if block_given?
|
5105
|
-
|
5107
|
+
throw :response, result
|
5106
5108
|
end
|
5107
5109
|
rescue ::Gapic::Rest::Error => e
|
5108
5110
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5190,7 +5192,7 @@ module Google
|
|
5190
5192
|
@net_app_stub.delete_backup_policy request, options do |result, operation|
|
5191
5193
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
5192
5194
|
yield result, operation if block_given?
|
5193
|
-
|
5195
|
+
throw :response, result
|
5194
5196
|
end
|
5195
5197
|
rescue ::Gapic::Rest::Error => e
|
5196
5198
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5270,6 +5272,11 @@ module Google
|
|
5270
5272
|
# default endpoint URL. The default value of nil uses the environment
|
5271
5273
|
# universe (usually the default "googleapis.com" universe).
|
5272
5274
|
# @return [::String,nil]
|
5275
|
+
# @!attribute [rw] logger
|
5276
|
+
# A custom logger to use for request/response debug logging, or the value
|
5277
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
5278
|
+
# explicitly disable logging.
|
5279
|
+
# @return [::Logger,:default,nil]
|
5273
5280
|
#
|
5274
5281
|
class Configuration
|
5275
5282
|
extend ::Gapic::Config
|
@@ -5298,6 +5305,7 @@ module Google
|
|
5298
5305
|
# by the host service.
|
5299
5306
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
5300
5307
|
config_attr :bindings_override, {}, ::Hash, nil
|
5308
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
5301
5309
|
|
5302
5310
|
# @private
|
5303
5311
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -536,6 +534,11 @@ module Google
|
|
536
534
|
# default endpoint URL. The default value of nil uses the environment
|
537
535
|
# universe (usually the default "googleapis.com" universe).
|
538
536
|
# @return [::String,nil]
|
537
|
+
# @!attribute [rw] logger
|
538
|
+
# A custom logger to use for request/response debug logging, or the value
|
539
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
540
|
+
# explicitly disable logging.
|
541
|
+
# @return [::Logger,:default,nil]
|
539
542
|
#
|
540
543
|
class Configuration
|
541
544
|
extend ::Gapic::Config
|
@@ -557,6 +560,7 @@ module Google
|
|
557
560
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
561
|
config_attr :quota_project, nil, ::String, nil
|
559
562
|
config_attr :universe_domain, nil, ::String, nil
|
563
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
564
|
|
561
565
|
# @private
|
562
566
|
def initialize parent_config = nil
|
@@ -676,16 +680,18 @@ module Google
|
|
676
680
|
|
677
681
|
response = @client_stub.make_http_request(
|
678
682
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
683
|
+
uri: uri,
|
684
|
+
body: body || "",
|
685
|
+
params: query_string_params,
|
686
|
+
method_name: "list_operations",
|
682
687
|
options: options
|
683
688
|
)
|
684
689
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
690
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
691
|
+
catch :response do
|
692
|
+
yield result, operation if block_given?
|
693
|
+
result
|
694
|
+
end
|
689
695
|
end
|
690
696
|
|
691
697
|
##
|
@@ -714,16 +720,18 @@ module Google
|
|
714
720
|
|
715
721
|
response = @client_stub.make_http_request(
|
716
722
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
723
|
+
uri: uri,
|
724
|
+
body: body || "",
|
725
|
+
params: query_string_params,
|
726
|
+
method_name: "get_operation",
|
720
727
|
options: options
|
721
728
|
)
|
722
729
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
730
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
731
|
+
catch :response do
|
732
|
+
yield result, operation if block_given?
|
733
|
+
result
|
734
|
+
end
|
727
735
|
end
|
728
736
|
|
729
737
|
##
|
@@ -752,16 +760,18 @@ module Google
|
|
752
760
|
|
753
761
|
response = @client_stub.make_http_request(
|
754
762
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
763
|
+
uri: uri,
|
764
|
+
body: body || "",
|
765
|
+
params: query_string_params,
|
766
|
+
method_name: "delete_operation",
|
758
767
|
options: options
|
759
768
|
)
|
760
769
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
770
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
771
|
+
catch :response do
|
772
|
+
yield result, operation if block_given?
|
773
|
+
result
|
774
|
+
end
|
765
775
|
end
|
766
776
|
|
767
777
|
##
|
@@ -790,16 +800,18 @@ module Google
|
|
790
800
|
|
791
801
|
response = @client_stub.make_http_request(
|
792
802
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
method_name: "cancel_operation",
|
796
807
|
options: options
|
797
808
|
)
|
798
809
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
810
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
811
|
+
catch :response do
|
812
|
+
yield result, operation if block_given?
|
813
|
+
result
|
814
|
+
end
|
803
815
|
end
|
804
816
|
|
805
817
|
##
|